scripts/shutdown: fix arguments to be sysvinit shutdown compatible

This fixes #140.
This commit is contained in:
William Hubbs 2017-06-12 12:24:18 -05:00
parent 2f81c100af
commit dcc686e42b

View File

@ -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"