From: Matt Turner Date: Mon, 2 Sep 2019 05:50:16 +0000 (-0700) Subject: net-fs/nfs-utils: Don't unexport directories on restart X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=998148dd775a5c629266fcd1c93837ac8ee3541d;p=gentoo.git net-fs/nfs-utils: Don't unexport directories on restart Originally added in 2007 (see commit a0fefa89daef "Remove some bashisms and support baselayout-2 restart option." in the historical repo), = vs != looks like an obvious typo. But, with RC_CMD, we don't need the extra restarting variable. Closes: https://bugs.gentoo.org/675644 Signed-off-by: Matt Turner --- diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd index 4b572fc2e5ed..bf599021c9a6 100644 --- a/net-fs/nfs-utils/files/nfs.initd +++ b/net-fs/nfs-utils/files/nfs.initd @@ -4,10 +4,6 @@ extra_started_commands="reload" -# This variable is used for controlling whether or not to run exportfs -ua; -# see stop() for more information -restarting=no - # The binary locations exportfs=/usr/sbin/exportfs mountd=/usr/sbin/rpc.mountd @@ -131,7 +127,7 @@ stop() { # then "exportfs -r" will reread the xtab, and all the current # clients will be able to resume NFS activity, *without* needing # to umount/(re)mount the filesystem. - if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then + if [ "${RC_CMD}" != "restart" ] ; then ebegin "Unexporting NFS directories" # Exportfs likes to hang if networking isn't working. # If that's the case, then try to kill it so the @@ -155,8 +151,6 @@ reload() { } restart() { - # See long comment in stop() regarding "restarting" and exportfs -ua - restarting=yes svc_stop svc_start }