aboutsummaryrefslogtreecommitdiff
path: root/scripts/shutdown.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-07 10:59:42 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-07 10:59:42 -0500
commit84d140a1f6abf95a4170d13527152d3ab14e6613 (patch)
treea5f4ff262b6a0d2516245c622488448e946bfcbf /scripts/shutdown.in
parentee886c44824b1dd892eaff2c6da666286e61bc73 (diff)
scripts/shutdown: pass --single to openrc-shutdown
Sysvinit shutdown has a default of single user mode, but openrc-shutdown makes you choose a default action. Because of this, the shutdown wrapper needs to pass --single to openrc-shutdown.
Diffstat (limited to 'scripts/shutdown.in')
-rw-r--r--scripts/shutdown.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 6bb65260..4f6ba637 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,3 +1,8 @@
#!@SHELL@
-exec @SBINDIR@/openrc-shutdown "$@"
+args="$@"
+case "$@" in
+ *--single*|*-s*) args="$@" ;;
+ *) args="--single $@";;
+esac
+exec @SBINDIR@/openrc-shutdown "$args"