diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-02-05 01:34:22 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-02-05 01:34:22 +0000 |
commit | e4f30c89f4a97fd26a82fe9068d70790084b16de (patch) | |
tree | 6ff20e901bda1bdbdbff11ce04b89a3240191422 /sys/man/8 | |
parent | dc725301592117ad0e70a0ab21926dcf5302ed31 (diff) |
ip/tftpd: add -m argument for name substitution using regular expressions
This allows mapping incoming filenames to a different name
using regular expressions, followed by subtitutions
of the %[ICE] format strings.
I needed this to have individual cmdline.txt files for
netbooted raspberry pi's. In this example, i map cmdline.txt
to %C, which gets substituted for /cfg/pxe/$ether of the client.
Diffstat (limited to 'sys/man/8')
-rw-r--r-- | sys/man/8/dhcpd | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/man/8/dhcpd b/sys/man/8/dhcpd index 5ec8c5557..6c62b9b0f 100644 --- a/sys/man/8/dhcpd +++ b/sys/man/8/dhcpd @@ -43,7 +43,9 @@ dhcpd, dhcp6d, dhcpleases, rarpd, tftpd \- Internet booting .RB [ -x .IR netmtpt ] .RB [ -n -.IR namespace-file ] +.IR nsfile ] +.RB [ -m +.IR mapfile ] .SH DESCRIPTION These programs support booting over the Internet. They should all be run on the same server to @@ -323,6 +325,26 @@ Restricts access to only those files rooted in the .TP .B n Sets the namespace file (default /lib/namespace). +.TP +.B m +Loads name substitutions from +.IR mapfile . +The format is a space or tab separated two-column text +with the first column being a regular expression +(see +.IR regexp (6)) +that is matched against the requested file name +and the second column contains a subsitution. +Lines starting with +.B # +are ignored. +Occurances in the resulting filename of +.BR %I , +.B %C +or +.B %E +are replaced with the ip, cfgpxe name or ether MAC of +of the client. .PD .SH FILES .BR /lib/ndb/dhcp " directory of dynamic address files |