mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +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
ea2a35415e
commit
0cef7fad35
@ -431,7 +431,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 );
|
||||
|
||||
@ -457,6 +458,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