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 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 . /usr/share/shorewall/shorewallrc

View File

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

View File

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

View File

@ -28,7 +28,7 @@
g_program=shorewall 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 . /usr/share/shorewall/shorewallrc

View File

@ -28,7 +28,7 @@
g_program=shorewall6-lite 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 . /usr/share/shorewall/shorewallrc

View File

@ -28,7 +28,7 @@
g_program=shorewall6 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 . /usr/share/shorewall/shorewallrc