@@ -104,6 +104,7 @@ for details.
.B nfsd
Recognized values:
.BR threads ,
+.BR host ,
.BR port ,
.BR grace-time ,
.BR lease-time ,
@@ -63,6 +63,7 @@ main(int argc, char **argv)
char *p, *progname, *port, *rdma_port = NULL;
char **haddr = NULL;
int hcounter = 0;
+ struct conf_list *hosts;
int socket_up = 0;
unsigned int minorvers = 0;
unsigned int minorversset = 0;
@@ -114,12 +115,26 @@ main(int argc, char **argv)
}
}
+ hosts = conf_get_list("nfsd", "host");
+ if (hosts && hosts->cnt) {
+ struct conf_list_node *n;
+ haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
+ TAILQ_FOREACH(n, &(hosts->fields), link) {
+ haddr[hcounter] = n->field;
+ hcounter++;
+ }
+ }
+
while ((c = getopt_long(argc, argv, "dH:hN:V:p:P:sTUrG:L:", longopts, NULL)) != EOF) {
switch(c) {
case 'd':
xlog_config(D_ALL, 1);
break;
case 'H':
+ if (hosts) {
+ hosts = NULL;
+ hcounter = 0;
+ }
if (hcounter) {
haddr = realloc(haddr, sizeof(char*) * hcounter+1);
if(!haddr) {
@@ -125,6 +125,13 @@ configuration file. Values recognized include:
.B threads
The number of threads to start.
.TP
+.B host
+A host name, or comma separated list of host names, that
+.I rpc.nfsd
+will listen on. Use of the
+.B --host
+option replaces all host names listed here.
+.TP
.B grace-time
The grace time, for both NFSv4 and NLM, in seconds.
.TP
A comma separate list of hosts can be given. If any host name is given with "--host" or "-H", then all hosts listed in nfs.conf are ignored. Signed-off-by: NeilBrown <neilb@suse.com> --- systemd/nfs.conf.man | 1 + utils/nfsd/nfsd.c | 15 +++++++++++++++ utils/nfsd/nfsd.man | 7 +++++++ 3 files changed, 23 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html