commit: 88e995482855356b79dc670420d31642162aaddb
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Jun 12 17:24:18 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 23:08:14 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=88e99548
scripts/shutdown: fix arguments to be sysvinit shutdown compatible
This fixes #140.
scripts/shutdown.in | 17 +++++++++++++----
1 file 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"