Add --digest to configure scripts.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-06-09 07:24:23 -07:00
parent 9197cdc9bd
commit 2bf16016c1
3 changed files with 10 additions and 4 deletions

View File

@ -180,7 +180,8 @@ for on in \
SYSCONFDIR \ SYSCONFDIR \
SPARSE \ SPARSE \
ANNOTATED \ ANNOTATED \
VARDIR VARDIR \
DIGEST
do do
echo "$on=${options[${on}]}" echo "$on=${options[${on}]}"
echo "$on=${options[${on}]}" >> shorewallrc echo "$on=${options[${on}]}" >> shorewallrc

View File

@ -141,7 +141,8 @@ for ( qw/ HOST
SYSCONFDIR SYSCONFDIR
SPARSE SPARSE
ANNOTATED ANNOTATED
VARDIR / ) { VARDIR
DIGEST / ) {
my $val = $options{$_} || ''; my $val = $options{$_} || '';

View File

@ -250,9 +250,13 @@ OWNERSHIP="-o $OWNER -g $GROUP"
if [ $PRODUCT = shorewall -a "$BUILD" = "$HOST" ]; then 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 if perl -e 'use Digest::SHA1;' 2> /dev/null ; then
sed -i 's/Digest::SHA/Digest::SHA1/' Perl/Shorewall/Chains.pm sed -i 's/Digest::SHA/Digest::SHA1/' Perl/Shorewall/Chains.pm
else else