From 846f25182545627d679da56f6776a6ee2d10279b Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 11 Mar 2008 23:04:11 +0000 Subject: [PATCH] Avoid generating 'non-existant variable' errors on the SCP and RSH commands in shorewall.conf git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8280 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index ab8853e91..2bd94f745 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -426,6 +426,13 @@ sub initialize() { INIT { initialize; + # + # These variables appear within single quotes in shorewall.conf -- add them to ENV + # so that read_a_line doesn't have to be smart enough to parse that usage. + # + for ( qw/root system command files destination/ ) { + $ENV{$_} = '' unless exists $ENV{$_}; + } } my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );