diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-04-27 17:51:51 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-04-27 17:51:51 +0000 |
commit | 66b402e198b741aaef0494b904ca943e26928dcf (patch) | |
tree | ee19f38f0278c8c957f0412e1d8ee665274c8aa4 /sbin/mount_nfs | |
parent | cb70a2e3166cf143bb017b92be577d0eef083a1e (diff) | |
download | FreeBSD-src-66b402e198b741aaef0494b904ca943e26928dcf.zip FreeBSD-src-66b402e198b741aaef0494b904ca943e26928dcf.tar.gz |
This patch changes head so that the default NFS client is now the new
NFS client (which I guess is no longer experimental). The fstype "newnfs"
is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
Although mounts via fstype "nfs" will usually work without userland
changes, an updated mount_nfs(8) binary is needed for kernels built with
"options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and
mount(8) binaries are needed to do mounts for fstype "oldnfs".
The GENERIC kernel configs have been changed to use options
NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER.
For kernels being used on diskless NFS root systems, "options NFSCL"
must be in the kernel config.
Discussed on freebsd-fs@.
Diffstat (limited to 'sbin/mount_nfs')
-rw-r--r-- | sbin/mount_nfs/Makefile | 2 | ||||
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile index 2e255b2..3068f0b 100644 --- a/sbin/mount_nfs/Makefile +++ b/sbin/mount_nfs/Makefile @@ -12,7 +12,7 @@ UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL} WARNS?= 3 -LINKS= ${BINDIR}/mount_nfs ${BINDIR}/mount_newnfs +LINKS= ${BINDIR}/mount_nfs ${BINDIR}/mount_oldnfs .PATH: ${MOUNT} ${UMNTALL} diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index 4f72b9a..5386723 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -273,7 +273,7 @@ main(int argc, char *argv[]) } else if (strcmp(opt, "nfsv4") == 0) { pass_flag_to_nmount=0; mountmode = V4; - fstype = "newnfs"; + fstype = "nfs"; nfsproto = IPPROTO_TCP; if (portspec == NULL) portspec = "2049"; @@ -381,14 +381,10 @@ main(int argc, char *argv[]) retrycnt = 0; /* - * If the experimental nfs subsystem is loaded into the kernel - * and the regular one is not, use it. Otherwise, use it if the - * fstype is set to "newnfs", either via "mount -t newnfs ..." - * or by specifying an nfsv4 mount. + * If the fstye is "oldnfs", run the old NFS client unless the + * "nfsv4" option was specified. */ - if (modfind("nfscl") >= 0 && modfind("nfs") < 0) { - fstype = "newnfs"; - } else if (strcmp(fstype, "newnfs") == 0) { + if (strcmp(fstype, "nfs") == 0) { if (modfind("nfscl") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfscl") < 0 || |