#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[] =
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;
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:
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;
* 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)