Don't unlink the tcrules file.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-19 11:48:23 -07:00
parent 1c33717cf5
commit 2b1f33c391

View File

@ -3242,18 +3242,13 @@ sub setup_tc( $ ) {
} else { } else {
fatal_error "Cannot Rename $fn to $fn.bak: $!"; fatal_error "Cannot Rename $fn to $fn.bak: $!";
} }
close $mangle, directive_callback( 0 );
} else { } else {
if ( unlink $fn ) { warning_message "The tcrules file is deprecated in favor of the mangle file -- consider running '$product upgrade -t'";
warning_message "Empty tcrules file ($fn) removed";
} else {
warning_message "Unable to remove empty tcrules file $fn: $!";
}
} }
close $mangle, directive_callback( 0 ) if $tcrules;
} elsif ( $tcrules ) { } elsif ( $tcrules ) {
close $mangle, directive_callback( 0 ) if $tcrules; close $mangle, directive_callback( 0 );
if ( -f ( my $fn = find_file( 'tcrules' ) ) ) { if ( -f ( my $fn = find_file( 'tcrules' ) ) ) {
if ( unlink $fn ) { if ( unlink $fn ) {