summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-12-17 12:30:37 -0500
committerSteve Dickson <steved@redhat.com>2016-12-20 13:29:04 -0500
commit280cf0b8be7760e552458149c31ba33967865806 (patch)
tree867d8f421eb1ced308a9ffe5b2bc8d16a16e3f54
parent50cb92f9da522a59442b4c34b7615a7baddb1e66 (diff)
downloadnfs-utils-280cf0b8be7760e552458149c31ba33967865806.tar.gz
nfsd: add /etc/nfs.conf support for nfsd.port option.
Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--systemd/nfs.conf.man5
-rw-r--r--utils/nfsd/nfsd.c4
-rw-r--r--utils/nfsd/nfsd.man3
3 files changed, 10 insertions, 2 deletions
diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
index 03f1f2b..23aa4ea 100644
--- a/systemd/nfs.conf.man
+++ b/systemd/nfs.conf.man
@@ -104,6 +104,7 @@ for details.
.B nfsd
Recognized values:
.BR threads ,
+.BR port ,
.BR grace-time ,
.BR lease-time ,
.BR udp ,
@@ -120,8 +121,10 @@ Version and protocol values are Boolean values as described above,
and are also used by
.BR rpc.mountd .
Threads and the two times are integers.
+.B port
+and
.B rdma
-is a service name or number. See
+are service names or numbers. See
.BR rpc.nfsd (8)
for details.
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index d8f873b..7c72bf0 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -72,7 +72,6 @@ main(int argc, char **argv)
int lease = -1;
progname = basename(argv[0]);
- port = "nfs";
haddr = xmalloc(sizeof(char *));
haddr[0] = NULL;
@@ -83,6 +82,9 @@ main(int argc, char **argv)
count = conf_get_num("nfsd", "threads", count);
grace = conf_get_num("nfsd", "grace-time", grace);
lease = conf_get_num("nfsd", "lease-time", lease);
+ port = conf_get_str("nfsd", "port");
+ if (!port)
+ port = "nfs";
rdma_port = conf_get_str("nfsd", "rdma");
if (conf_get_bool("nfsd", "udp", NFSCTL_UDPISSET(protobits)))
NFSCTL_UDPSET(protobits);
diff --git a/utils/nfsd/nfsd.man b/utils/nfsd/nfsd.man
index 7b9fbf2..bc00464 100644
--- a/utils/nfsd/nfsd.man
+++ b/utils/nfsd/nfsd.man
@@ -131,6 +131,9 @@ The grace time, for both NFSv4 and NLM, in seconds.
.B lease-time
The lease time for NFSv4, in seconds.
.TP
+.B port
+Set the port for TCP/UDP to bind to.
+.TP
.B rdma
Set RDMA port. Use "rdma=nfsrdma" to enable standard port.
.TP