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 <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# 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