aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rc.d/init.d/functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index d3159163..0f1d0420 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -47,7 +47,8 @@ systemctl_redirect () {
options="--ignore-dependencies"
fi
- if systemctl show -p LoadState "$prog.service" | grep -q 'not-found' ; then
+ if ! systemctl show "$prog.service" > /dev/null 2>&1 || \
+ systemctl show -p LoadState "$prog.service" | grep -q 'not-found' ; then
action $"Reloading systemd: " /bin/systemctl daemon-reload
fi