From cdb75bfd9634a30e35717957e99030a237678702 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 1 Dec 2010 09:14:09 -0800 Subject: [PATCH] Better solution to multi-line exported symbols issue --- Shorewall/Perl/Shorewall/Config.pm | 12 +++++++----- Shorewall/Perl/getparams | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 41ae8cc54..ef410c109 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2905,12 +2905,14 @@ sub get_params() { fatal_error "Processing of $fn failed" if $?; + my $variable; + for ( @params ) { - if ( /^(.*?)=(.*)$/ ) { - $params{$1} = $2 unless $1 eq '_'; - } else { - warning_message "Unrecognized output from 'env' ($_) ignored"; - } + if ( /^export (.*?)='(.*)'$/ ) { + $params{$variable = $1} = $2 unless $1 eq '_'; + } elsif ( /^export (.*?)='/ ) { + warning_message "Exported symbol '$1' ignored"; + } } } } diff --git a/Shorewall/Perl/getparams b/Shorewall/Perl/getparams index 65b8ac69c..605f2132b 100755 --- a/Shorewall/Perl/getparams +++ b/Shorewall/Perl/getparams @@ -32,4 +32,4 @@ set -a set +a -env +export -p