Add conversion version and date to the converted files.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-13 14:37:13 -07:00
parent 306dc34b31
commit 60acddbb37
2 changed files with 13 additions and 1 deletions

View File

@ -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 ) ) {

View File

@ -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 ) ) {