Cosmetic changes to first_entry() calls

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-31 10:54:30 -07:00
parent 656eaabce9
commit e15a6f452e

View File

@ -3177,15 +3177,16 @@ sub convert_tos($$) {
} }
if ( my $fn = open_file 'tos' ) { if ( my $fn = open_file 'tos' ) {
first_entry first_entry(
sub { sub {
my $date = localtime; my $date = localtime;
progress_message2 "Converting $fn..."; progress_message2 "Converting $fn...";
print( $mangle print( $mangle
"#\n" , "#\n" ,
"# Rules generated from tos file $fn by Shorewall $globals{VERSION} - $date\n" , "# Rules generated from tos file $fn by Shorewall $globals{VERSION} - $date\n" ,
"#\n" ); "#\n" );
}; }
);
while ( read_a_line( NORMAL_READ ) ) { while ( read_a_line( NORMAL_READ ) ) {
@ -3347,20 +3348,20 @@ sub setup_tc( $ ) {
directive_callback( sub () { print $mangle "$_[1]\n" unless $_[0] eq 'FORMAT'; 0; } ); directive_callback( sub () { print $mangle "$_[1]\n" unless $_[0] eq 'FORMAT'; 0; } );
} }
first_entry(
first_entry sub {
sub { if ( $convert ) {
if ( $convert ) { my $date = localtime;
my $date = localtime; progress_message2 "Converting $fn...";
progress_message2 "Converting $fn..."; print( $mangle
print( $mangle "#\n" ,
"#\n" , "# Rules generated from tcrules file $fn by Shorewall $globals{VERSION} - $date\n" ,
"# Rules generated from tcrules file $fn by Shorewall $globals{VERSION} - $date\n" , "#\n" );
"#\n" ); } else {
} else { progress_message2 "$doing $fn...";
progress_message2 "$doing $fn..."; }
} }
}; );
process_tc_rule, $have_tcrules++ while read_a_line( NORMAL_READ ); process_tc_rule, $have_tcrules++ while read_a_line( NORMAL_READ );