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
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
my $val = $params{$3};
$params{$3} = $ENV{$3} if exists $ENV{$3};
unless ( defined $val ) {
$params{$3} = $ENV{$3} if $ENV{$3};
fatal_error "Undefined shell variable (\$$3)" unless exists $params{$3};
$val = '';
}
@ -2884,7 +2885,7 @@ sub get_params() {
my $fn = find_file 'params';
if ( $fn ) {
progress_message1 "Processing $fn ...";
progress_message2 "Processing $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
the compiler.
In this new implementation, the contents of the params file
override the environment of the program that runs
/usr/share/shorewall/compiler.pl.
In this new implementation, the contents of the environment of the
program that launches /usr/share/shorewall/compiler.pl overrides
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