summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/man/8/dhcpd5
-rw-r--r--sys/src/cmd/ip/tftpd.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/man/8/dhcpd b/sys/man/8/dhcpd
index 082a28114..5ec8c5557 100644
--- a/sys/man/8/dhcpd
+++ b/sys/man/8/dhcpd
@@ -42,6 +42,8 @@ dhcpd, dhcp6d, dhcpleases, rarpd, tftpd \- Internet booting
.IR homedir ]
.RB [ -x
.IR netmtpt ]
+.RB [ -n
+.IR namespace-file ]
.SH DESCRIPTION
These programs support booting over the Internet.
They should all be run on the same server to
@@ -318,6 +320,9 @@ supports only octet mode.
.B r
Restricts access to only those files rooted in the
.IR homedir .
+.TP
+.B n
+Sets the namespace file (default /lib/namespace).
.PD
.SH FILES
.BR /lib/ndb/dhcp " directory of dynamic address files
diff --git a/sys/src/cmd/ip/tftpd.c b/sys/src/cmd/ip/tftpd.c
index aa69b3423..07ca3b37e 100644
--- a/sys/src/cmd/ip/tftpd.c
+++ b/sys/src/cmd/ip/tftpd.c
@@ -93,6 +93,7 @@ char raddr[64];
char *dirsl;
int dirsllen;
char *homedir = "/";
+char *nsfile = nil;
char flog[] = "ipboot";
char net[Maxpath];
@@ -138,6 +139,9 @@ main(int argc, char **argv)
case 'x':
setnetmtpt(net, sizeof net, EARGF(usage()));
break;
+ case 'n':
+ nsfile = EARGF(usage());
+ break;
default:
usage();
}ARGEND
@@ -740,7 +744,7 @@ setuser(void)
{
if(procsetuser("none") < 0)
sysfatal("can't become none: %r");
- if(newns("none", nil) < 0)
+ if(newns("none", nsfile) < 0)
sysfatal("can't build namespace: %r");
}