From: jweber Date: Fri, 1 Sep 2000 18:51:50 +0000 (+0000) Subject: rpc.mountd nfs version detection X-Git-Tag: nfs-utils-0-2~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0f0769643d8e2876f99dc1dbd6ff374333d0a159;p=nfs-utils.git rpc.mountd nfs version detection --- diff --git a/ChangeLog b/ChangeLog index 0f30fc0..45e7d41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-09-01 Jay Weber + + * etc/redhat/nfs.init: Added ability for rpc.mountd to default to + supporting version 3 of nfs if available, else it will fall back to + version 2 support only. + 2000-08-30 H.J. Lu * configure.in (VERSION): Set to "0.2". diff --git a/etc/redhat/nfs.init b/etc/redhat/nfs.init index eb95a24..5a40f4f 100755 --- a/etc/redhat/nfs.init +++ b/etc/redhat/nfs.init @@ -29,8 +29,8 @@ fi # Number of servers to be started up by default RPCNFSDCOUNT=8 -# No NFS V3. -RPCMOUNTDOPTS="--no-nfs-version 3" +# Default to NFS version 3. +RPCMOUNTDOPTS="" # See how we were called. case "$1" in @@ -40,12 +40,19 @@ case "$1" in echo -n "Starting NFS quotas: " daemon rpc.rquotad echo - echo -n "Starting NFS mountd: " - daemon rpc.mountd $RPCMOUNTDOPTS - echo echo -n "Starting NFS daemon: " daemon rpc.nfsd $RPCNFSDCOUNT echo + + # Let's see if we support NFS version 3. + /usr/sbin/rpcinfo -u localhost nfs 3 &>/dev/null + if [ $? -ne 0 ]; then + RPCMOUNTDOPTS="--no-nfs-version 3" + fi + + echo -n "Starting NFS mountd: " + daemon rpc.mountd $RPCMOUNTDOPTS + echo touch /var/lock/subsys/nfs ;; stop)