From dcc686e42b406d63d52ef75de9a326f67d0a06c9 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 12 Jun 2017 12:24:18 -0500 Subject: 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" -- cgit v1.2.3