mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-21 23:23:13 +01:00
Pave the way for unifying the CLI
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
137b051e52
commit
8b99fe20b5
@ -79,7 +79,8 @@ if [ -z "$PRODUCT" ]; then
|
||||
# This is modified by the installer when ${SHAREDIR} != /usr/share
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
g_readrc=1
|
||||
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
setup_environment
|
||||
fi
|
||||
|
@ -27,13 +27,12 @@
|
||||
|
||||
SHOREWALL_CAPVERSION=50004
|
||||
|
||||
if [ -z "$g_readrc" ]; then
|
||||
if [ -z "$g_basedir" ]; then
|
||||
#
|
||||
# This is modified by the installer when ${SHAREDIR} <> /usr/share
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
fi
|
||||
|
||||
@ -4459,7 +4458,22 @@ shorewall_cli() {
|
||||
g_nopager=Yes
|
||||
option=${option#p}
|
||||
;;
|
||||
|
||||
6*)
|
||||
if [ "$PRODUCT" = shorewall ]; then
|
||||
PRODUCT=shorewall6
|
||||
elif [ "$PRODUCT" = shorewall-lite ]; then
|
||||
PRODUCT=shorewall6-lite
|
||||
fi
|
||||
option=${option#6}
|
||||
;;
|
||||
4*)
|
||||
if [ "$PRODUCT" = shorewall6 ]; then
|
||||
PRODUCT=shorewall
|
||||
elif [ "$PRODUCT" = shorewall6-lite ]; then
|
||||
PRODUCT=shorewall-lite
|
||||
fi
|
||||
option=${option#4}
|
||||
;;
|
||||
-)
|
||||
finished=1
|
||||
option=
|
||||
|
@ -45,19 +45,20 @@
|
||||
# require Shorewall to be installed.
|
||||
|
||||
|
||||
g_program=shorewall-lite
|
||||
PRODUCT=shorewall-lite
|
||||
|
||||
#
|
||||
# This is modified by the installer when ${SHAREDIR} != /usr/share
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_sharedir="$SHAREDIR"/shorewall-lite
|
||||
g_confdir="$CONFDIR"/shorewall-lite
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. ${SHAREDIR}/shorewall/lib.cli
|
||||
. /usr/share/shorewall-lite/configpath
|
||||
|
||||
setup_environment
|
||||
|
||||
. ${SHAREDIR}/shorewall-lite/configpath
|
||||
|
||||
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||
|
||||
|
@ -32,7 +32,6 @@ PRODUCT=shorewall-lite
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. ${g_basedir}/lib.cli
|
||||
|
@ -38,12 +38,11 @@ fi
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_program=$PRODUCT
|
||||
g_sharedir="$SHAREDIR/shorewall"
|
||||
g_confdir="$CONFDIR/$PRODUCT"
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. $g_sharedir/lib.cli
|
||||
. $g_basedir/lib.cli
|
||||
|
||||
setup_environment
|
||||
|
||||
CONFIG_PATH="$2"
|
||||
|
||||
|
@ -32,7 +32,6 @@ PRODUCT=shorewall
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. ${g_basedir}/lib.cli
|
||||
|
@ -44,18 +44,19 @@
|
||||
# used during firewall compilation, then the generated firewall program will likewise not
|
||||
# require Shorewall to be installed.
|
||||
|
||||
g_program=shorewall6-lite
|
||||
PRODUCT=shorewall6-lite
|
||||
|
||||
#
|
||||
# This is modified by the installer when ${SHAREDIR} != /usr/share
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_sharedir="$SHAREDIR"/shorewall6-lite
|
||||
g_confdir="$CONFDIR"/shorewall6-lite
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. ${SHAREDIR}/shorewall/lib.cli
|
||||
|
||||
setup_environment
|
||||
|
||||
. ${SHAREDIR}/shorewall-lite/configpath
|
||||
|
||||
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||
|
@ -33,7 +33,6 @@ PRODUCT=shorewall6-lite
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
g_readrc=1
|
||||
|
||||
. ${g_basedir}/lib.cli
|
||||
|
||||
|
@ -32,7 +32,6 @@ PRODUCT=shorewall6
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
g_readrc=1
|
||||
g_basedir=${SHAREDIR}/shorewall
|
||||
|
||||
. ${g_basedir}/lib.cli
|
||||
|
Loading…
Reference in New Issue
Block a user