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.nfsd8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/n/nfs-utils/rc.nfsd b/source/n/nfs-utils/rc.nfsd
index 965db6b4c..06c34b018 100644
--- a/source/n/nfs-utils/rc.nfsd
+++ b/source/n/nfs-utils/rc.nfsd
@@ -24,6 +24,14 @@ 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