From 96b19dd2188b5a2a234d8de71a9f663c1f4a980c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 15 Sep 2009 13:01:20 -0700 Subject: [PATCH] Fix accounting extension feature --- Shorewall/Perl/Shorewall/Chains.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 8674d94ff..40d6330f7 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -949,17 +949,19 @@ sub ensure_accounting_chain( $ ) $chainref->{accounting} = 1; $chainref->{referenced} = 1; - my $file = find_file $chain; + if ( $chain ne 'accounting' ) { + my $file = find_file $chain; - if ( -f $file ) { - progress_message "Processing $file..."; + if ( -f $file ) { + progress_message "Processing $file..."; - my ( $level, $tag ) = ( '', '' ); + my ( $level, $tag ) = ( '', '' ); - unless ( my $return = eval `cat $file` ) { - fatal_error "Couldn't parse $file: $@" if $@; - fatal_error "Couldn't do $file: $!" unless defined $return; - fatal_error "Couldn't run $file" unless $return; + unless ( my $return = eval `cat $file` ) { + fatal_error "Couldn't parse $file: $@" if $@; + fatal_error "Couldn't do $file: $!" unless defined $return; + fatal_error "Couldn't run $file" unless $return; + } } } }