mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-27 00:29:02 +01:00
Add conversion version and date to the converted files.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
306dc34b31
commit
60acddbb37
@ -696,7 +696,8 @@ sub convert_routestopped() {
|
||||
if ( my $fn = open_file 'routestopped' ) {
|
||||
my ( @allhosts, %source, %dest , %notrack, @rule );
|
||||
|
||||
my $seq = 0;
|
||||
my $seq = 0;
|
||||
my $date = localtime;
|
||||
|
||||
my ( $stoppedrules, $fn1 );
|
||||
|
||||
@ -722,6 +723,11 @@ sub convert_routestopped() {
|
||||
EOF
|
||||
}
|
||||
|
||||
print( $stoppedrules
|
||||
"#\n" ,
|
||||
"# Rules generated from routestopped file $fn by Shorewall $globals{VERSION} - $date\n" ,
|
||||
"#\n" );
|
||||
|
||||
first_entry "$doing $fn...";
|
||||
|
||||
while ( read_a_line ( NORMAL_READ ) ) {
|
||||
|
@ -363,6 +363,7 @@ sub setup_conntrack($) {
|
||||
if ( $convert ) {
|
||||
my $conntrack;
|
||||
my $empty = 1;
|
||||
my $date = localtime;
|
||||
|
||||
if ( $fn ) {
|
||||
open $conntrack, '>>', $fn or fatal_error "Unable to open $fn for notrack conversion: $!";
|
||||
@ -385,6 +386,11 @@ EOF
|
||||
EOF
|
||||
}
|
||||
|
||||
print( $conntrack
|
||||
"#\n" ,
|
||||
"# Rules generated from notrack file $fn by Shorewall $globals{VERSION} - $date\n" ,
|
||||
"#\n" );
|
||||
|
||||
$fn = open_file( 'notrack' , 3, 1 ) || fatal_error "Unable to open the notrack file for conversion: $!";
|
||||
|
||||
while ( read_a_line( PLAIN_READ ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user