From bf75b2b919fca90da9a25c7966ec2374074b3ba7 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 26 Nov 2012 13:23:20 -0800 Subject: [PATCH] $0 expands to the current action chain name. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index f1488d87d..ddd36ae48 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2480,8 +2480,8 @@ sub expand_variables( \$ ) { my $val; if ( $var =~ /^\d+$/ ) { - fatal_error "Undefined parameter (\$$var)" unless $var > 0 && defined $actparms[$var]; - $val = $actparms[$var]; + fatal_error "Undefined parameter (\$$var)" unless defined $actparms[$var]; + $val = $var ? $actparms[$var] : $actparms[0]->{name}; } elsif ( exists $params{$var} ) { $val = $params{$var}; } elsif ( exists $shorewallrc{$var} ) {