diff options
-rw-r--r-- | scripts/shutdown.in | 17 |
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" |