network check if a zone exist before executing commands

Message ID 1498031128-7530-1-git-send-email-jonatan.schlag@ipfire.org
State Accepted
Commit 9ea45130c83574f116a6b312836abc0b0f37aea8


Jonatan Schlag June 21, 2017, 5:45 p.m. UTC
  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(-)