commit: dcc686e42b406d63d52ef75de9a326f67d0a06c9 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 17:24:18 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dcc686e4
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"