aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-12 12:24:18 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-12 12:24:18 -0500
commitdcc686e42b406d63d52ef75de9a326f67d0a06c9 (patch)
treebbb3c327a06421ddc823eb4a72ffc555165d8b98 /scripts
parent2f81c100afdf45ebf787dfc5d3261aa6055640e4 (diff)
scripts/shutdown: fix arguments to be sysvinit shutdown compatible
This fixes #140.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/shutdown.in17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 4f6ba637..4a3d9fd1 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,8 +1,17 @@
#!@SHELL@
-args="$@"
-case "$@" in
- *--single*|*-s*) args="$@" ;;
- *) args="--single $@";;
+args=
+for x; do
+ case "$x" in
+ -h) args=" ${args} --halt" ;;
+ *) args=" ${args} ${x} " ;;
+ esac
+done
+
+case "$args" in
+ *-h|--halt*) ;;
+ *-s|--single*) ;;
+ *) args=" --single ${args}" ;;
esac
+
exec @SBINDIR@/openrc-shutdown "$args"