X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fnfsd%2Fnfsd.c;h=8bc5d3ad9afc5b962164d188354c8587d29b545c;hp=1cda1e59ca0521b4b6203de8b5d33edb94dc1559;hb=014e00dfaea0efc92150e2aedc5ca43aa337545e;hpb=b2a3cd590442309d40e9dd6d43213445df250694 diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index 1cda1e5..8bc5d3a 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -27,15 +27,6 @@ #include "nfssvc.h" #include "xlog.h" -/* - * IPv6 support for nfsd was finished before some of the other daemons (mountd - * and statd in particular). That could be a problem in the future if someone - * were to boot a kernel that supports IPv6 serving with an older nfs-utils. For - * now, hardcode the IPv6 switch into the off position until the other daemons - * are functional. - */ -#undef IPV6_SUPPORTED - static void usage(const char *); static struct option longopts[] = @@ -103,7 +94,7 @@ main(int argc, char **argv) char *p, *progname, *port; char *haddr = NULL; int socket_up = 0; - int minorvers4 = NFSD_MAXMINORVERS4; /* nfsv4 minor version */ + int minorvers41 = 0; /* nfsv4 minor version */ unsigned int versbits = NFSCTL_ALLBITS; unsigned int protobits = NFSCTL_ALLBITS; unsigned int proto4 = 0; @@ -163,7 +154,12 @@ main(int argc, char **argv) switch((c = strtol(optarg, &p, 0))) { case 4: if (*p == '.') { - minorvers4 = -atoi(p + 1); + int i = atoi(p+1); + if (i != 1) { + fprintf(stderr, "%s: unsupported minor version\n", optarg); + exit(1); + } + minorvers41 = -1; break; } case 3: @@ -246,6 +242,9 @@ main(int argc, char **argv) exit(1); } + /* make sure nfsdfs is mounted if it's available */ + nfssvc_mount_nfsdfs(progname); + /* can only change number of threads if nfsd is already up */ if (nfssvc_inuse()) { socket_up = 1; @@ -257,7 +256,7 @@ main(int argc, char **argv) * registered with rpcbind. Note that on older kernels w/o the right * interfaces, these are a no-op. */ - nfssvc_setvers(versbits, minorvers4); + nfssvc_setvers(versbits, minorvers41); error = nfssvc_set_sockets(AF_INET, proto4, haddr, port); if (!error)