Correct tcrules update

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-13 13:21:51 -07:00
parent af2b7910bd
commit f5c6a6fe82

View File

@ -3252,11 +3252,15 @@ sub setup_tc( $ ) {
close $mangle, directive_callback( 0 ) if $tcrules;
} elsif ( $tcrules && -f ( my $fn = find_file( 'tcrules' ) ) ) {
if ( unlink $fn ) {
warning_message "Empty tcrules file ($fn) removed";
} else {
warning_message "Unable to remove empty tcrules file $fn: $!";
} elsif ( $tcrules ) {
close $mangle, directive_callback( 0 ) if $tcrules;
if ( -f ( my $fn = find_file( 'tcrules' ) ) ) {
if ( unlink $fn ) {
warning_message "Empty tcrules file ($fn) removed";
} else {
warning_message "Unable to remove empty tcrules file $fn: $!";
}
}
}
}