X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=etc%2Fredhat%2Fnfs.init;h=5a40f4f8f454b5f9717f0e80a41a705a142febee;hb=0f0769643d8e2876f99dc1dbd6ff374333d0a159;hp=a66761914eef4d1be2a13000706a7647b6ada506;hpb=313c1662bb9dfd8094de0cc4666b03f1b9e89d22;p=nfs-utils.git diff --git a/etc/redhat/nfs.init b/etc/redhat/nfs.init index a667619..5a40f4f 100755 --- a/etc/redhat/nfs.init +++ b/etc/redhat/nfs.init @@ -29,25 +29,30 @@ 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 start) # Start daemons. + action "Starting NFS services: " /usr/sbin/exportfs -r 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 - # Do it the last so that all clients mounting points are - # exported. FIXME: Why? - action "Starting NFS services: " /usr/sbin/exportfs -r + + # 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)