summaryrefslogtreecommitdiffstats
path: root/source/n/nfs-utils/rc.nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/nfs-utils/rc.nfsd')
-rw-r--r--source/n/nfs-utils/rc.nfsd18
1 files changed, 4 insertions, 14 deletions
diff --git a/source/n/nfs-utils/rc.nfsd b/source/n/nfs-utils/rc.nfsd
index 06c34b018..b73d8cc81 100644
--- a/source/n/nfs-utils/rc.nfsd
+++ b/source/n/nfs-utils/rc.nfsd
@@ -24,26 +24,16 @@ nfsd_start() {
exit # no uncommented shares in /etc/exports
fi
- # Without this directory the logs will complain with
- # 'NFSD: Unable to end grace period'.
- NFSV4RECOVERYDIR=$(cat /proc/fs/nfsd/nfsv4recoverydir)
- if [ -r /proc/fs/nfsd/nfsv4recoverydir -a ! -d "$NFSV4RECOVERYDIR" ]; then
- mkdir "$NFSV4RECOVERYDIR"
- chown -R rpc:rpc "$NFSV4RECOVERYDIR"
- fi
-
# If we do not detect nfsd support built into the kernel (or previously
# loaded as a module), we will try to load the nfsd.ko kernel module:
if [ ! -r /proc/1/net/rpc/nfsd ]; then
/sbin/modprobe nfsd
fi
- # For kernels newer than 2.4.x, use the new way of handling nfs client requests.
- if [ ! "$(/bin/uname -r | /bin/cut -f 1,2 -d .)" = "2.4" ]; then
- if grep -wq nfsd /proc/filesystems 2> /dev/null ; then
- if grep -vwq nfsd /proc/mounts 2> /dev/null ; then
- /sbin/mount -t nfsd nfsd /proc/fs/nfs 2> /dev/null
- fi
+ # Mount the nfsd filesystem:
+ if awk '$NF == "nfsd"' /proc/filesystems | grep -q . ; then
+ if ! awk '$3 == "nfsd" && $2 == "/proc/fs/nfs"' /proc/mounts | grep -q . ; then
+ /sbin/mount -t nfsd nfsd /proc/fs/nfs 2> /dev/null
fi
fi