From 8ebbdee20ff277904ac126869a499da8378025c3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 1 Dec 2012 12:52:26 -0800 Subject: [PATCH] Only look for numerics if a shell variable begins with a number. 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 84f8bc284..691d43f13 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2481,8 +2481,8 @@ sub set_action_param( $$ ) { # sub expand_variables( \$ ) { my ( $lineref, $count ) = ( $_[0], 0 ); - # $1 $2 $3 - $4 - while ( $$lineref =~ m( ^(.*?) \$({)? (\w+) (?(2)}) (.*)$ )x ) { + # $1 $2 $3 - $4 + while ( $$lineref =~ m( ^(.*?) \$({)? (\d+|[a-zA-Z]\w*) (?(2)}) (.*)$ )x ) { my ( $first, $var, $rest ) = ( $1, $3, $4);