From 2f3f6ffa1576d759d6e26715a00fe8be992aee2b Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 17 Mar 2019 08:02:53 -0700 Subject: [PATCH] Revert "Make $update global in Config.pm" This reverts commit b9d0821acb0fc4e5af22abf3eb3e11cc467b836a. --- Shorewall/Perl/Shorewall/Config.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index d13bfb9f9..2b47fa714 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -684,7 +684,6 @@ our $shorewall_dir; # Shorewall Directory; if non-empty, search here fi our $debug; # Global debugging flag our $confess; # If true, use Carp to report errors with stack trace. -our $update; # True if this is an update our $family; # Protocol family (4 or 6) our $export; # True when compiling for export @@ -1192,7 +1191,6 @@ sub initialize( $;$$$) { $debug = 0; $confess = 0; - $update = 0; %params = (); @@ -4023,9 +4021,9 @@ sub read_a_line($) { # handle_first_entry if $first_entry; # - # Save Raw Image if we are updating + # Save Raw Image # - $rawcurrentline = $currentline if $update; + $rawcurrentline = $currentline; # # Expand Shell Variables using %params and %actparams # @@ -5595,8 +5593,8 @@ EOF # # Small functions called by get_configuration. We separate them so profiling is more useful # -sub process_shorewall_conf( $ ) { - my ( $annotate ) = @_; +sub process_shorewall_conf( $$ ) { + my ( $update, $annotate ) = @_; my $file = find_file "$product.conf"; my @vars; @@ -6177,7 +6175,7 @@ sub convert_to_version_5_2() { # sub get_configuration( $$$ ) { - ( my $export, $update, my $annotate ) = @_; + my ( $export, $update, $annotate ) = @_; $globals{EXPORT} = $export; @@ -6239,7 +6237,7 @@ sub get_configuration( $$$ ) { get_params( $export ); - process_shorewall_conf( $annotate ); + process_shorewall_conf( $update, $annotate ); ensure_config_path;