net-fs/nfs-utils: Don't unexport directories on restart
authorMatt Turner <mattst88@gentoo.org>
Mon, 2 Sep 2019 05:50:16 +0000 (22:50 -0700)
committerMatt Turner <mattst88@gentoo.org>
Mon, 2 Sep 2019 07:08:13 +0000 (00:08 -0700)
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 <mattst88@gentoo.org>
net-fs/nfs-utils/files/nfs.initd

index 4b572fc2e5edf45cf16a521ca93c2e7251e85b69..bf599021c9a69fee467e14d9ba46cf27f0a51baf 100644 (file)
@@ -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
 }