forked from extern/shorewall_code
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
@ -432,6 +432,7 @@ sub convert_routestopped() {
|
|||||||
my ( @allhosts, %source, %dest , %notrack, @rule );
|
my ( @allhosts, %source, %dest , %notrack, @rule );
|
||||||
|
|
||||||
my $seq = 0;
|
my $seq = 0;
|
||||||
|
my $date = localtime;
|
||||||
|
|
||||||
my ( $stoppedrules, $fn1 );
|
my ( $stoppedrules, $fn1 );
|
||||||
|
|
||||||
@ -457,6 +458,11 @@ sub convert_routestopped() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print( $stoppedrules
|
||||||
|
"#\n" ,
|
||||||
|
"# Rules generated from routestopped file $fn by Shorewall $globals{VERSION} - $date\n" ,
|
||||||
|
"#\n" );
|
||||||
|
|
||||||
first_entry "$doing $fn...";
|
first_entry "$doing $fn...";
|
||||||
|
|
||||||
while ( read_a_line ( NORMAL_READ ) ) {
|
while ( read_a_line ( NORMAL_READ ) ) {
|
||||||
|
@ -363,6 +363,7 @@ sub setup_conntrack($) {
|
|||||||
if ( $convert ) {
|
if ( $convert ) {
|
||||||
my $conntrack;
|
my $conntrack;
|
||||||
my $empty = 1;
|
my $empty = 1;
|
||||||
|
my $date = localtime;
|
||||||
|
|
||||||
if ( $fn ) {
|
if ( $fn ) {
|
||||||
open $conntrack, '>>', $fn or fatal_error "Unable to open $fn for notrack conversion: $!";
|
open $conntrack, '>>', $fn or fatal_error "Unable to open $fn for notrack conversion: $!";
|
||||||
@ -385,6 +386,11 @@ EOF
|
|||||||
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: $!";
|
$fn = open_file( 'notrack' , 3, 1 ) || fatal_error "Unable to open the notrack file for conversion: $!";
|
||||||
|
|
||||||
while ( read_a_line( PLAIN_READ ) ) {
|
while ( read_a_line( PLAIN_READ ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user