From 2bf16016c11a7d8028c8d4b7bfd832c5335d7973 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 9 Jun 2012 07:24:23 -0700 Subject: [PATCH] Add --digest to configure scripts. Signed-off-by: Tom Eastep --- Shorewall-core/configure | 3 ++- Shorewall-core/configure.pl | 3 ++- Shorewall/install.sh | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Shorewall-core/configure b/Shorewall-core/configure index 860976aa6..377c92073 100755 --- a/Shorewall-core/configure +++ b/Shorewall-core/configure @@ -180,7 +180,8 @@ for on in \ SYSCONFDIR \ SPARSE \ ANNOTATED \ - VARDIR + VARDIR \ + DIGEST do echo "$on=${options[${on}]}" echo "$on=${options[${on}]}" >> shorewallrc diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index 439c3ca7e..8485692f4 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -141,7 +141,8 @@ for ( qw/ HOST SYSCONFDIR SPARSE ANNOTATED - VARDIR / ) { + VARDIR + DIGEST / ) { my $val = $options{$_} || ''; diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 9601e5ccb..941974517 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -250,9 +250,13 @@ OWNERSHIP="-o $OWNER -g $GROUP" if [ $PRODUCT = shorewall -a "$BUILD" = "$HOST" ]; then # - # Fix up 'use Digest::' if SHA is installed + # Fix up 'use Digest::' if SHA1 is installed # - if ! perl -e 'use Digest::SHA;' 2> /dev/null ; then + if [ -n "$DIGEST" ]; then + if [ "$DIGEST" != SHA ]; then + eval sed -i \'s/Digest::SHA/Digest::$DIGEST/\' Perl/Shorewall/Chains.pm + fi + elif ! perl -e 'use Digest::SHA;' 2> /dev/null ; then if perl -e 'use Digest::SHA1;' 2> /dev/null ; then sed -i 's/Digest::SHA/Digest::SHA1/' Perl/Shorewall/Chains.pm else