From 0ef7cdb5f56e2922ac1b1272cd8280cb67f05f18eb8074a64ae2cea050b3e51e Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 4 Sep 2014 02:58:00 +0000 Subject: [PATCH] - nfsserver.init: allow $NFSD_V4_GRACE to set the lease time if NFSV4LEASETIME is not set, as some documentation suggests this. Also set NFSv4 and NLM grace time to make the NFSv4 lease time as having them different at boot time doesn't make sense. (bnc#892809) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=132 --- nfs-utils.changes | 10 ++++++++++ nfsserver.init | 14 +++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 07ff223..d186132 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Sep 4 02:55:22 UTC 2014 - nfbrown@suse.com + +- nfsserver.init: allow $NFSD_V4_GRACE to set the lease + time if NFSV4LEASETIME is not set, as some documentation + suggests this. + Also set NFSv4 and NLM grace time to make the NFSv4 lease time + as having them different at boot time doesn't make sense. + (bnc#892809) + ------------------------------------------------------------------- Mon Jul 7 01:57:26 UTC 2014 - nfbrown@suse.com diff --git a/nfsserver.init b/nfsserver.init index a65a805..5308ad9 100644 --- a/nfsserver.init +++ b/nfsserver.init @@ -93,6 +93,11 @@ case "$NFS4_SERVER_MINOR_VERSION" in * ) NFS4_SERVER_MINOR_VERSION=0 esac +if [ -n "$NFSV4LEASETIME" ] ; then + # Documentation inconsistency. + NFSV4LEASETIME=$NFSD_V4_GRACE +fi + check_for_nfsdfs() { HAVE_NFSDFS="no" while read dummy type ; do @@ -213,9 +218,12 @@ case "$1" in if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then VERSION_PARAMS="$VERSION_PARAMS --nfs-version 4 --nfs-version 4.$NFS4_SERVER_MINOR_VERSION" fi - if [ -n "$NFSV4LEASETIME" -a -f /proc/fs/nfsd/nfsv4leasetime ]; then - echo "$NFSV4LEASETIME" > /proc/fs/nfsd/nfsv4leasetime - fi + for fl in /proc/fs/nfsd/nfsv4leasetime /proc/fs/nfsd/nfsv4gracetime /proc/sys/fs/nfs/nlm_grace_period + do + if [ -n "$NFSV4LEASETIME" -a -f $fl ]; then + echo "$NFSV4LEASETIME" > $fl + fi + done nfs4_bind_mounts # svcgssd; gssd; idmapd