Correct tcrules update

Signed-off-by: Tom Eastep <teastep@shorewall.net>

Conflicts:
	Shorewall/Perl/Shorewall/Tc.pm
This commit is contained in:
Tom Eastep 2015-08-13 13:21:51 -07:00
parent 2ab8bd3040
commit 4cc7a1b87d

View File

@ -3226,12 +3226,17 @@ sub setup_tc( $ ) {
}
}
close $mangle, directive_callback( 0 ) if $tcrules;
} elsif ( $tcrules ) {
close $mangle, directive_callback( 0 );
} elsif ( -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: $!";
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: $!";
}
}
}
} elsif ( -f ( my $fn = find_file( 'tcrules' ) ) ) {