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 jonatan.schlag@ipfire.org --- src/network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network b/src/network index ea7f7d6..20f65e8 100644 --- a/src/network +++ b/src/network @@ -551,7 +551,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