We now check the config inside the hook_parse_cmdline function.
This mae it possible ti use this function in a generic edit function.
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
esac
shift
done
+
+ # Check if the user disabled ipv6 and ipv4
+ if ! enabled ENABLE_IPV6 && ! enabled ENABLE_IPV4; then
+ log ERROR "You disabled IPv6 and IPv4. At least one must be enabled"
+ return ${EXIT_ERROR}
+ fi
}
hook_new() {
return ${EXIT_ERROR}
fi
- # Check if the user disabled ipv4 and ipv6
-
- if ! enabled ENABLE_IPV6 && ! enabled ENABLE_IPV4; then
- log ERROR "You disabled IPv6 and IPv4. At least one must be enabled"
- return ${EXIT_ERROR}
- fi
-
zone_config_settings_write "${zone}" "${HOOK}"
exit ${EXIT_OK}