On Thu, 2011-06-23 at 15:10 -0700, Tom Eastep wrote:

> 
> New Features:
> 
> 1)  The 'shorewall update' (and 'shorewall6 update') now updates 
>     shorewall.conf *before* validating the configuration.
> 

I noticed this morning that while the update is occurring prior to
configuration validation, the updated values are not being used in that
validation.

Corrected by the attached patch.

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________

diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm
index 9880ae3..8c2714f 100644
--- a/Shorewall/Perl/Shorewall/Config.pm
+++ b/Shorewall/Perl/Shorewall/Config.pm
@@ -2915,13 +2915,15 @@ sub update_config_file( $ ) {
 			#
 			# OPTION='' - use default if 'Yes' or 'No'
 			#
-			$val = $default if $default eq 'Yes' || $default eq 'No';
+			$config{$var} = $val = $default if $default eq 'Yes' || $default eq 'No';
 		    } else {
 			#
 			# Wasn't mentioned in old file - use default value
 			#
-			$val = $default;
+			$config{$var} = $val = $default;
+
 		    }
+
 		}
 
 		unless ( $val =~ /^[-\w\/\.]*$/ ) {

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to