If we only shift if $1 is red, green, blue or orange, $# never gets zero when the input is: /etc/init.d/network green stop When we get an invalid zone we stop the script, as this happening should not be masked. Signed-off-by: Jonatan Schlag --- src/initscripts/system/network | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/initscripts/system/network b/src/initscripts/system/network index f334561de..a78473110 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -41,12 +41,15 @@ else fi while [ ! $# = 0 ]; do - for i in green red blue orange; do - if [ "${i}" == "${1}" ]; then - eval "${i}=1" - shift - fi - done + if network_zone_exists "${1}"; then + printf -v "${1}" '%s' '1' + else + boot_mesg "'${1}' is not a valid zone" ${FAILURE} + echo_failure + # Set ${DO} to something silly that we get an usage message + DO="error" + fi + shift done case "${DO}" in -- 2.39.2