From: Jonatan Schlag Date: Wed, 19 Jul 2017 14:10:21 +0000 (+0200) Subject: zone: fix zone_new X-Git-Tag: 009~155 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fnetwork.git;a=commitdiff_plain;h=a63e51c6dfeeb50dc05a5af3539acb103606cf1f zone: fix zone_new Everytime somethings goes wrong when we call hook_new we wannt to call zone_destroy. Not only when we get an EXIT_ERROR also when we get an EXIT_CONF_ERROR and so on. Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.zone b/src/functions/functions.zone index 11a8dc20..91ce6297 100644 --- a/src/functions/functions.zone +++ b/src/functions/functions.zone @@ -243,7 +243,7 @@ zone_new() { # Maybe the zone new hook did not exit correctly. # If this is the case we remove the created zone immediately. - if [ "${ret}" = "${EXIT_ERROR}" ]; then + if [ "${ret}" != "${EXIT_OK}" ]; then zone_destroy_now "${zone}" return ${EXIT_ERROR} fi