From: Michael Tremer Date: Sat, 22 Jun 2019 13:50:00 +0000 (+0000) Subject: firewall: Add init action to main script X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e446cf0bff8c1dc409479bf02b0fc8912847c13;p=people%2Fms%2Fnetwork.git firewall: Add init action to main script Signed-off-by: Michael Tremer --- diff --git a/src/firewall b/src/firewall index db7284cd..c47ac611 100644 --- a/src/firewall +++ b/src/firewall @@ -19,11 +19,35 @@ # # ############################################################################### +# Parse the command line +while [ $# -gt 0 ]; do + case "${1}" in + -d|--debug) + DEBUG=1 + ;; + *) + action=${1} + ;; + esac + shift + [ -n "${action}" ] && break +done + . /usr/lib/network/functions # Read firewall settings firewall_settings_read -firewall_cli "ipv6" "$@" +case "${action}" in + # Initialise kernel with firewall settings + init) + firewall_kernel_init + exit $? + ;; + + *) + firewall_cli "ipv6" "${action}" "$@" + ;; +esac exit ${EXIT_ERROR}