nut: Fix checking for path before it exists
authorDaniel F. Dickinson <redacted>
Wed, 10 Oct 2018 01:47:46 +0000 (21:47 -0400)
committerDaniel F. Dickinson <redacted>
Mon, 19 Nov 2018 21:39:53 +0000 (16:39 -0500)
The mechanism for making sure hotplug doesn't execute during forced shutdown
was interfering with initial start of hotplug script due to checking for path
that doesn't exist at initial start.  This fixes that and closes #6966.

Signed-off-by: Daniel F. Dickinson <redacted>
net/nut/files/30-libhid-ups.tail

index 24c2a9670c10011dff47adfdc5517738a359657d..343fd09634d81453b7a068363910aa62a9ae60a6 100644 (file)
@@ -1,5 +1,5 @@
 "")
-       [ -d /var/run/nut ] && [ ! -f /var/run/nut/disable-hotplug ] && \
-               /etc/init.d/nut-server enabled &&  perform_libhid_action
+       [ ! -f /var/run/nut/disable-hotplug ] && \
+               /etc/init.d/nut-server enabled && perform_libhid_action
        ;;
 esac
git clone https://git.99rst.org/PROJECT