diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index 5bf0dbacc..b170fa95c 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -66,10 +66,11 @@ if ( defined $vendor ) { open $rcfile, '<', $rcfilename or die "Unable to open $rcfilename for input: $!"; while ( <$rcfile> ) { - next if /\s*#/; - - die "Invalid entry ($_) in $rcfile, line $." unless /\s*(\w+)=(.*)/; - + next if /^\s*#/; + s/\s*#.*//; + next if /^\s*$/; + chomp; + die "Invalid entry ($_) in $rcfilename, line $." unless /\s*(\w+)=(.*)/; $options{$1} = $2; }