Merge branch '4.5.2'

Conflicts:
	Shorewall-core/lib.cli
	Shorewall/Perl/Shorewall/Config.pm

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-04-16 13:47:05 -07:00
commit 52ebca3fe1
8 changed files with 18 additions and 19 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
#

View File

@ -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

View File

@ -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

View File

@ -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