$0 expands to the current action chain name.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-11-26 13:23:20 -08:00
parent 7673b1ac4b
commit bf75b2b919

View File

@ -2480,8 +2480,8 @@ sub expand_variables( \$ ) {
my $val; my $val;
if ( $var =~ /^\d+$/ ) { if ( $var =~ /^\d+$/ ) {
fatal_error "Undefined parameter (\$$var)" unless $var > 0 && defined $actparms[$var]; fatal_error "Undefined parameter (\$$var)" unless defined $actparms[$var];
$val = $actparms[$var]; $val = $var ? $actparms[$var] : $actparms[0]->{name};
} elsif ( exists $params{$var} ) { } elsif ( exists $params{$var} ) {
$val = $params{$var}; $val = $params{$var};
} elsif ( exists $shorewallrc{$var} ) { } elsif ( exists $shorewallrc{$var} ) {