Modify getparams to use the installed shorewallrc file.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-04-07 09:07:07 -07:00
parent c5f44d8737
commit a2abad3f68
6 changed files with 13 additions and 15 deletions

View File

@ -28,7 +28,7 @@
g_program=shorewall-lite
#
# This is modified by the installer when ${SHAREDIR} <> /usr/share
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc

View File

@ -33,22 +33,19 @@ else
g_program=shorewall
fi
if [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc || exit 1
else
SHAREDIR=/usr/share
CONFDIR=${CONFDIR}
SBINDIR=/sbin
VARDIR=/var/lib
LIBEXECDIR=/usr/share
fi
#
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc
g_libexec="$LIBEXECDIR"
g_sharedir="$SHAREDIR"
g_sharedir="$SHAREDIR"/shorewall
g_sbindir="$SBINDIR"
g_perllib="$PERLLIBDIR"
g_confdir="$CONFDIR"/shorewall
g_readrc=1
. $g_sharedir/shorewall/lib.cli
. $g_sharedir/lib.cli
CONFIG_PATH="$2"

View File

@ -1016,6 +1016,7 @@ if [ -d Perl ]; then
# Install the params file helper
#
install_file getparams ${DESTDIR}${LIBEXECDIR}/$PRODUCT/getparams 0755
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${LIBEXECDIR}/$PRODUCT/getparams
echo
echo "Params file helper installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/getparams"

View File

@ -28,7 +28,7 @@
g_program=shorewall
#
# This is modified by the installer when ${SHAREDIR} <> /usr/share
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc

View File

@ -28,7 +28,7 @@
g_program=shorewall6-lite
#
# This is modified by the installer when ${SHAREDIR} <> /usr/share
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc

View File

@ -28,7 +28,7 @@
g_program=shorewall6
#
# This is modified by the installer when ${SHAREDIR} <> /usr/share
# This is modified by the installer when ${SHAREDIR} != /usr/share
#
. /usr/share/shorewall/shorewallrc