summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nfsd/nfsd.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-04-24 00:06:56 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-04-24 00:06:56 +0000
commit9ed5d7279c80c342d3be8d0c4665f775b0d06800 (patch)
treeb3cf39884011bd89b37f624a87ecf52c5fdf16f7 /usr.sbin/nfsd/nfsd.c
parent9a90a81671fea1dbdda1a4f131849694a874edcb (diff)
downloadFreeBSD-src-9ed5d7279c80c342d3be8d0c4665f775b0d06800.zip
FreeBSD-src-9ed5d7279c80c342d3be8d0c4665f775b0d06800.tar.gz
This patch changes the default NFS server to the new one, which was
referred to as the experimental server. It also adds a new command line option "-o" to both mountd and nfsd that forces them to use the old/regular NFS server. The "-e" option for these commands is now a no-op, since the new server is the default. I will be committing rc script and man changes soon. Discussed on freebsd-fs@.
Diffstat (limited to 'usr.sbin/nfsd/nfsd.c')
-rw-r--r--usr.sbin/nfsd/nfsd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 6e607f7..656cb14 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.sbin/nfsd/nfsd.c
@@ -88,7 +88,7 @@ int debug = 0;
pid_t children[MAXNFSDCNT]; /* PIDs of children */
int nfsdcnt; /* number of children */
int new_syscall;
-int run_v4server = 0; /* Force running of nfsv4 server */
+int run_v4server = 1; /* Force running of nfsv4 server */
int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */
int stablefd = -1; /* Fd for the stable restart file */
int backupfd; /* Fd for the backup stable restart file */
@@ -152,8 +152,8 @@ main(int argc, char **argv)
nfsdcnt = DEFNFSDCNT;
unregister = reregister = tcpflag = maxsock = 0;
bindanyflag = udpflag = connect_type_cnt = bindhostc = 0;
-#define GETOPT "ah:n:rdtue"
-#define USAGE "[-ardtue] [-n num_servers] [-h bindip]"
+#define GETOPT "ah:n:rdtueo"
+#define USAGE "[-ardtueo] [-n num_servers] [-h bindip]"
while ((ch = getopt(argc, argv, GETOPT)) != -1)
switch (ch) {
case 'a':
@@ -189,7 +189,10 @@ main(int argc, char **argv)
udpflag = 1;
break;
case 'e':
- run_v4server = 1;
+ /* now a no-op, since this is the default */
+ break;
+ case 'o':
+ run_v4server = 0;
break;
default:
case '?':
@@ -216,9 +219,8 @@ main(int argc, char **argv)
}
/*
- * If the "-e" option was specified OR only the nfsd module is
- * found in the server, run "nfsd".
- * Otherwise, try and run "nfsserver".
+ * Unless the "-o" option was specified, try and run "nfsd".
+ * If "-o" was specified, try and run "nfsserver".
*/
if (run_v4server > 0) {
if (modfind("nfsd") < 0) {
@@ -226,8 +228,6 @@ main(int argc, char **argv)
if (kldload("nfsd") < 0 || modfind("nfsd") < 0)
errx(1, "NFS server is not available");
}
- } else if (modfind("nfsserver") < 0 && modfind("nfsd") >= 0) {
- run_v4server = 1;
} else if (modfind("nfsserver") < 0) {
/* Not present in kernel, try loading it */
if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0)
OpenPOWER on IntegriCloud