From 2b1f33c39137fe45a13e3663ced35d8ee340cc6f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 19 Aug 2015 11:48:23 -0700 Subject: [PATCH] Don't unlink the tcrules file. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index fa1070a92..24ffc854f 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -3242,18 +3242,13 @@ sub setup_tc( $ ) { } else { fatal_error "Cannot Rename $fn to $fn.bak: $!"; } + + close $mangle, directive_callback( 0 ); } else { - if ( unlink $fn ) { - warning_message "Empty tcrules file ($fn) removed"; - } else { - warning_message "Unable to remove empty tcrules file $fn: $!"; - } + warning_message "The tcrules file is deprecated in favor of the mangle file -- consider running '$product upgrade -t'"; } - - close $mangle, directive_callback( 0 ) if $tcrules; - } elsif ( $tcrules ) { - close $mangle, directive_callback( 0 ) if $tcrules; + close $mangle, directive_callback( 0 ); if ( -f ( my $fn = find_file( 'tcrules' ) ) ) { if ( unlink $fn ) {