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>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
local action
local zone
- if zone_name_is_valid ${1}; then
+ if zone_exists ${1}; then
zone=${1}
action=${2}
shift 2