Realign precedence of environment inheritance

This commit is contained in:
Tom Eastep 2010-11-06 19:02:14 -07:00
parent 25397e8284
commit 092f032b8e
2 changed files with 6 additions and 5 deletions

View File

@ -1863,9 +1863,10 @@ sub read_a_line(;$) {
# $1 $2 $3 - $4 # $1 $2 $3 - $4
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) { while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
my $val = $params{$3}; my $val = $params{$3};
$params{$3} = $ENV{$3} if exists $ENV{$3};
unless ( defined $val ) { unless ( defined $val ) {
$params{$3} = $ENV{$3} if $ENV{$3};
fatal_error "Undefined shell variable (\$$3)" unless exists $params{$3}; fatal_error "Undefined shell variable (\$$3)" unless exists $params{$3};
$val = ''; $val = '';
} }
@ -2884,7 +2885,7 @@ sub get_params() {
my $fn = find_file 'params'; my $fn = find_file 'params';
if ( $fn ) { if ( $fn ) {
progress_message1 "Processing $fn ..."; progress_message2 "Processing $fn ...";
my @params = `$globals{SHAREDIRPL}/getparams $fn`; my @params = `$globals{SHAREDIRPL}/getparams $fn`;

View File

@ -34,9 +34,9 @@ VI. PROBLEMS CORRECTED AND NEW FEATURES IN PRIOR RELEASES
to process the file and to pass the (variable,value) pairs back to to process the file and to pass the (variable,value) pairs back to
the compiler. the compiler.
In this new implementation, the contents of the params file In this new implementation, the contents of the environment of the
override the environment of the program that runs program that launches /usr/share/shorewall/compiler.pl overrides
/usr/share/shorewall/compiler.pl. the contents of /etc/shorewall/params.
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
I V. R E L E A S E 4 . 4 H I G H L I G H T S I V. R E L E A S E 4 . 4 H I G H L I G H T S