From c83536767e411f27421d21919c825f2bf1ddb0a8 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 30 Oct 2015 08:54:07 -0700 Subject: [PATCH] Move get_config() into the overloadable part of the file Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 45 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 11b221347..b17d68d9f 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -3495,9 +3495,30 @@ noiptrace_command() { fatal_error "$g_product is not started" fi } + +# +# Verify that we have a compiled firewall script +# +verify_firewall_script() { + if [ ! -f $g_firewall ]; then + echo " ERROR: $g_product is not properly installed" >&2 + if [ -L $g_firewall ]; then + echo " $g_firewall is a symbolic link to a" >&2 + echo " non-existant file" >&2 + else + echo " The file $g_firewall does not exist" >&2 + fi + + exit 2 + fi +} + +################################################################################ +# The remaining functions are used by the Lite cli - they are overloaded by +# the Standard CLI by loading lib.cli-std +################################################################################ # # Set the configuration variables from shorewall[6]-lite.conf. -# This function is overloaded by lib.cli-std in the full products # get_config() { local config @@ -3644,28 +3665,6 @@ get_config() { [ -f $lib ] && . $lib } - -# -# Verify that we have a compiled firewall script -# -verify_firewall_script() { - if [ ! -f $g_firewall ]; then - echo " ERROR: $g_product is not properly installed" >&2 - if [ -L $g_firewall ]; then - echo " $g_firewall is a symbolic link to a" >&2 - echo " non-existant file" >&2 - else - echo " The file $g_firewall does not exist" >&2 - fi - - exit 2 - fi -} - -################################################################################ -# The remaining functions are used by the Lite cli - they are overloaded by -# the Standard CLI by loading lib.cli-std -################################################################################ # # Start Command Executor #