Use a function to load configuration files

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Matt Darfeuille 2018-04-13 13:17:18 +02:00 committed by Tom Eastep
parent 98d5bf8f55
commit 99be0ce970
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1617,23 +1617,15 @@ remote_commands() # $* = original arguments less the command.
g_export=Yes
if [ -f $g_shorewalldir/${PRODUCT}.conf ]; then
if [ -f $g_shorewalldir/params ]; then
. $g_shorewalldir/params
fi
ensure_config_path
ensure_config_path
get_config Yes
get_config No
g_haveconfig=Yes
g_haveconfig=Yes
if [ -z "$system" ]; then
system=$FIREWALL
[ -n "$system" ] || fatal_error "No system name given and the FIREWALL option is not set"
fi
else
fatal_error "$g_shorewalldir/$PRODUCT.conf does not exist"
if [ -z "$system" ]; then
system=$FIREWALL
[ -n "$system" ] || fatal_error "No system name given and the FIREWALL option is not set"
fi
if [ -z "$getcaps" ]; then