diff options
| author | jweber <jweber> | 2000-09-01 18:51:50 +0000 |
|---|---|---|
| committer | jweber <jweber> | 2000-09-01 18:51:50 +0000 |
| commit | 0f0769643d8e2876f99dc1dbd6ff374333d0a159 (patch) | |
| tree | 64f6ab0bb6d4a80dfca72833d5bd0702a2a8a01f /etc | |
| parent | ab54ee454b411b1eeedbb65ad0ae14d587c3b09d (diff) | |
rpc.mountd nfs version detection
Diffstat (limited to 'etc')
| -rwxr-xr-x | etc/redhat/nfs.init | 17 |
1 files changed, 12 insertions, 5 deletions
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) |
