- if [ ! -f /var/lock/subsys/nfs ]; then
- if ! grep -q nfsd /proc/mounts ; then
- modprobe -s nfsd > /dev/null 2>&1
- run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
- fi
-
- # Set the ports lockd should listen on
- if [ -n "$LOCKD_TCPPORT" ]; then
- /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
- fi
- if [ -n "$LOCKD_UDPPORT" ]; then
- /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
- fi
-
- for vers in 1 2 3 4 ; do
- is_yes $(eval echo \$NFSv$vers) || \
- RPCMOUNTOPTIONS="$RPCMOUNTOPTIONS --no-nfs-version $vers"
- done