Disable directive callbacks after file conversion.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-11-09 07:47:19 -08:00
parent 42c1c2a205
commit ef4ab62dd3
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
2 changed files with 6 additions and 0 deletions

View File

@ -311,6 +311,8 @@ sub convert_blacklist() {
}
}
directive_callback(0);
if ( @rules ) {
my $fn1 = find_writable_file( 'blrules' );
my $blrules;
@ -521,6 +523,8 @@ EOF
push @allhosts, @hosts;
}
directive_callback(0);
for my $host ( @allhosts ) {
my ( $interface, $h, $seq ) = split /\|/, $host;
my $rule = shift @rule;

View File

@ -2247,6 +2247,8 @@ sub convert_tos($$) {
$have_tos = 1;
}
directive_callback(0);
if ( $have_tos ) {
progress_message2 "Converted $fn to $fn1";
if ( rename $fn, "$fn.bak" ) {