From: Jonatan Schlag Date: Wed, 21 Jun 2017 07:45:28 +0000 (+0200) Subject: network check if a zone exist before executing commands X-Git-Tag: 009~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ea45130c83574f116a6b312836abc0b0f37aea8;p=network.git network check if a zone exist before executing commands We checked if a zone name was valid so network zone net0 ... fails when theres was no zone net0. net0 is a valid zone name so we jumped into the wrong if part. We now check if a zone exist and when now network zone net0 ... is called when no zone net0 exists we print an error message. This behaviour is similar to network port .., there we do the same thing with port_exists Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/network b/src/network index e2c9db30..154d2536 100644 --- a/src/network +++ b/src/network @@ -554,7 +554,7 @@ cli_zone() { local action local zone - if zone_name_is_valid ${1}; then + if zone_exists ${1}; then zone=${1} action=${2} shift 2