diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 59e2f91b4..b945f0933 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -4019,9 +4019,15 @@ setup_dbl() { # the Standard CLI by loading lib.cli-std ################################################################################ # -# Set the configuration variables from shorewall[6]-lite.conf. +# Set the configuration variables from shorewall[6]-lite.conf. This function +# is replaced by the one in lib.cli-std (Shorewall product) when Shorewall or +# Shorewall6 is being run. # -get_config() { +# $1 = Yes: read the params file +# $2 = Yes: check for STARTUP_ENABLED +# $3 = Yes: Check for LOGFILE +# +lite_get_config() { local config local lib @@ -4183,10 +4189,22 @@ get_config() { [ -f $lib ] && . $lib } + +# +# get_config() -- calls the appropriate xxx_get_config() +# +get_config() { + if [ -z "$g_lite" ]; then + std_get_config $@ + else + lite_get_config $@ + fi +} + # # Start Command Executor # -start_command() { +lite_start_command() { local finished finished=0 @@ -4273,10 +4291,21 @@ start_command() { do_it } +# +# start_command() -- calls the appropriate xxx_start_command() +# +start_command() { + if [ -z "$g_lite" ]; then + std_start_command $@ + else + lite_start_command $@ + fi +} + # # Reload/Restart Command Executor # -restart_command() { +lite_restart_command() { local finished finished=0 local rc @@ -4345,6 +4374,17 @@ restart_command() { return $rc } +# +# restart_command() -- calls the appropriate xxx_restart_command() +# +restart_command() { + if [ -z "$g_lite" ]; then + std_restart_command $@ + else + lite_restart_command $@ + fi +} + run_command() { if [ -x $g_firewall ] ; then run_it $g_firewall $@ diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index 7bd32d8c3..a5a497674 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -29,7 +29,7 @@ # $2 = Yes: check for STARTUP_ENABLED # $3 = Yes: Check for LOGFILE # -get_config() { +std_get_config() { local prog local lib @@ -568,7 +568,7 @@ compiler() { # # Start Command Executor # -start_command() { +std_start_command() { local finished finished=0 local rc @@ -967,7 +967,7 @@ update_command() { # # Reload/Restart Command Executor # -restart_command() { +std_restart_command() { local finished finished=0 local rc