Allow leading whitespace in shorewall.conf

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5766 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-30 23:31:22 +00:00
parent e3aa8fd449
commit 946aca4938

View File

@ -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";