From 2f29623ab1f3b24b31a6b9f12b9e703b1244c401 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 30 Jun 2007 17:12:57 +0000 Subject: [PATCH] Re-allow leading whitespace before INCLUDE git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6732 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index 61ccff44c..c39b43ce8 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -549,20 +549,16 @@ sub read_a_line { # # Ignore ( concatenated ) Blank Lines # - if ( $line =~ /^\s*$/ ) { - $line = ''; - next; - } - + $line = '', next if $line =~ /^\s*$/; # # Expand Shell Variables using %ENV # $line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/; $line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/; - if ( $line =~ /^INCLUDE\s/ ) { + if ( $line =~ /^\s*INCLUDE\s/ ) { - my @line = split ' ', $line, 3; + my @line = split ' ', $line; fatal_error "Invalid INCLUDE command: $line" if @line != 2; fatal_error "INCLUDEs nested too deeply: $line" if @includestack >= 4;