From 946aca4938b0dc84dc1604ffc323147eee104d29 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 30 Mar 2007 23:31:22 +0000 Subject: [PATCH] Allow leading whitespace in shorewall.conf git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5766 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/New/Shorewall/Config.pm b/New/Shorewall/Config.pm index c2601168e..c8f92cd04 100644 --- a/New/Shorewall/Config.pm +++ b/New/Shorewall/Config.pm @@ -479,7 +479,7 @@ sub get_configuration() { open_file $file; while ( read_a_line ) { - if ( $line =~ /^([a-zA-Z]\w*)=(.*?)\s*$/ ) { + if ( $line =~ /^\s*([a-zA-Z]\w*)=(.*?)\s*$/ ) { my ($var, $val) = ($1, $2); unless ( exists $config{$var} ) { warning_message "Unknown configuration option \"$var\" ignored"; @@ -509,7 +509,7 @@ sub get_configuration() { next if $line =~ /^\s*#/; next if $line =~ /^\s*$/; - if ( $line =~ /^([a-zA-Z]\w*)=(.*?)\s*$/ ) { + if ( $line =~ /^\s*([a-zA-Z]\w*)=(.*?)\s*$/ ) { my ($var, $val) = ($1, $2); unless ( exists $capabilities{$var} ) { warning_message "Unknown capability \"$var\" ignored";