From 3e446cf0bff8c1dc409479bf02b0fc8912847c13 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 22 Jun 2019 13:50:00 +0000 Subject: [PATCH] firewall: Add init action to main script Signed-off-by: Michael Tremer --- src/firewall | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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} -- 2.39.2