mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 01:23:14 +01:00
Cosmetic changes to first_entry() calls
Signed-off-by: Tom Eastep <teastep@shorewall.net> Conflicts: Shorewall/Perl/Shorewall/Tc.pm
This commit is contained in:
parent
87ef6f730f
commit
9638033e24
@ -3155,15 +3155,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 ) ) {
|
||||||
|
|
||||||
@ -3320,20 +3321,16 @@ 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 {
|
my $date = localtime;
|
||||||
if ( $convert ) {
|
progress_message2 "Converting $fn...";
|
||||||
my $date = localtime;
|
print( $mangle
|
||||||
progress_message2 "Converting $fn...";
|
"#\n" ,
|
||||||
print( $mangle
|
"# Rules generated from tcrules file $fn by Shorewall $globals{VERSION} - $date\n" ,
|
||||||
"#\n" ,
|
"#\n" );
|
||||||
"# Rules generated from tcrules file $fn by Shorewall $globals{VERSION} - $date\n" ,
|
}
|
||||||
"#\n" );
|
);
|
||||||
} else {
|
|
||||||
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 );
|
||||||
|
|
||||||
@ -3370,7 +3367,7 @@ sub setup_tc( $ ) {
|
|||||||
#
|
#
|
||||||
# We are going to convert this tosfile to the equivalent mangle file
|
# We are going to convert this tosfile to the equivalent mangle file
|
||||||
#
|
#
|
||||||
( $mangle, my $fn1 ) = open_mangle_for_output;
|
( $mangle, $fn1 ) = open_mangle_for_output;
|
||||||
convert_tos( $mangle, $fn1 );
|
convert_tos( $mangle, $fn1 );
|
||||||
close $mangle;
|
close $mangle;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user