diff --git a/Shorewall-core/configure b/Shorewall-core/configure index 78f29d765..a13fef4bf 100755 --- a/Shorewall-core/configure +++ b/Shorewall-core/configure @@ -159,7 +159,7 @@ echo '#' > shore echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc echo '#' >> shorewallrc -if [ -n "$@" ]; then +if [ $# -gt 0 ]; then echo "# Input: $@" >> shorewallrc echo '#' >> shorewallrc fi diff --git a/Shorewall-core/lib.base b/Shorewall-core/lib.base index 7e5ed63a4..bb4cbeb16 100644 --- a/Shorewall-core/lib.base +++ b/Shorewall-core/lib.base @@ -41,6 +41,7 @@ if [ -z "$g_readrc" ]; then g_libexec="$LIBEXECDIR" g_sharedir="$SHAREDIR"/$g_program g_sbindir="$SBINDIR" + g_perllib="$PERLLIBDIR" g_vardir="$VARDIR" g_confdir="$CONFDIR"/$g_program g_readrc=1 diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 9ef08c862..6dd835d6a 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -31,9 +31,11 @@ if [ -z "$g_readrc" ]; then . /usr/share/shorewall/shorewallrc g_libexec="$LIBEXECDIR" - g_sbindir="$SBINDIR" - g_confdir="$CONFDIR"/$g_program g_sharedir="$SHAREDIR"/$g_program + g_sbindir="$SBINDIR" + g_perllib="$PERLLIBDIR" + g_vardir="$VARDIR" + g_confdir="$CONFDIR"/$g_program g_readrc=1 fi @@ -454,25 +456,12 @@ sort_routes() { done | sort -r | while read dest rest; do echo $rest; done } -# -# Find the table name in the passed routing rule -# -find_table() { - local word - - while [ $# -gt 1 ]; do - word=$1 - shift - [ $word = lookup ] && echo $1 && break - done -} - # # Isolate the table in the routing rules being read from stdin # find_tables() { - while read rule; do - find_table $rule + sed -r 's/[[:space:]]+$//' | while read rule; do + echo ${rule##* } done } diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite index 4ca3b3f58..1db8395dd 100755 --- a/Shorewall-lite/shorewall-lite +++ b/Shorewall-lite/shorewall-lite @@ -35,6 +35,7 @@ g_program=shorewall-lite g_libexec="$LIBEXECDIR" g_sharedir="$SHAREDIR"/shorewall-lite g_sbindir="$SBINDIR" +g_vardir="$VARDIR" g_confdir="$CONFDIR"/shorewall-lite g_readrc=1 diff --git a/Shorewall/install.sh b/Shorewall/install.sh index a73e57215..dad48cc12 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -249,6 +249,12 @@ OWNERSHIP="-o $OWNER -g $GROUP" # if [ $PRODUCT = shorewall -a -z "${DESTDIR}" ]; then + # + # Fix up 'use Digest::' if SHA is installed + # + if perl -e 'use Digest::SHA;' 2> /dev/null ; then + sed -i 's/Digest::SHA1/Digest::SHA/' Perl/Shorewall/Chains.pm + fi # # Verify that Perl is installed # diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 3fb3f1522..a2f081428 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -36,6 +36,7 @@ g_libexec="$LIBEXECDIR" g_sharedir="$SHAREDIR"/shorewall g_sbindir="$SBINDIR" g_perllib="$PERLLIBDIR" +g_vardir="$VARDIR" g_confdir="$CONFDIR"/shorewall g_readrc=1 diff --git a/Shorewall6-lite/shorewall6-lite b/Shorewall6-lite/shorewall6-lite index 688d1ec34..8f18b48b7 100755 --- a/Shorewall6-lite/shorewall6-lite +++ b/Shorewall6-lite/shorewall6-lite @@ -35,7 +35,7 @@ g_program=shorewall6-lite g_libexec="$LIBEXECDIR" g_sharedir="$SHAREDIR"/shorewall6-lite g_sbindir="$SBINDIR" -g_perllib="$PERLLIBDIR" +g_vardir="$VARDIR" g_confdir="$CONFDIR"/shorewall6-lite g_readrc=1 diff --git a/Shorewall6/shorewall6 b/Shorewall6/shorewall6 index 73034269c..82a16605d 100755 --- a/Shorewall6/shorewall6 +++ b/Shorewall6/shorewall6 @@ -36,6 +36,7 @@ g_libexec="$LIBEXECDIR" g_sharedir="$SHAREDIR"/shorewall6 g_sbindir="$SBINDIR" g_perllib="$PERLLIBDIR" +g_vardir="$VARDIR" g_confdir="$CONFDIR"/shorewall6 g_readrc=1