Now all "active" Strings from all languagefiles are checked against the old rule to find out if logging is enabled

Conflicts:
	config/firewall/convert-outgoingfw
This commit is contained in:
Alexander Marx
2013-11-26 13:34:08 +01:00
parent 5558ca2a96
commit 02cb636c8b
2 changed files with 8 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ my %fwconfigout=();
my %fwdsettings=();
my %ownnet=();
my %ovpnSettings = ();
my @active= ('Aktiv', 'aktiv', 'Active', 'Activo', 'Actif', 'Actief', 'Aktywne', 'Активен', 'Aktif');
&General::readhash("${General::swroot}/ovpn/settings", \%ovpnSettings);
&General::readhash($outfwsettings,\%outsettings);
&General::readhash("${General::swroot}/ethernet/settings", \%ownnet);
@@ -382,7 +383,12 @@ sub process_rules
$configline[4] =~ s/,/;/g;
$remark = $configline[4];
}else{$remark = '';}
if($configline[9] eq 'Active'){ $log='ON';}else{$log='';}
#find all "active" tags in all language files and check them against the old config
my $logging='0';
foreach (@active){
$logging='1' if ($_ eq $configline[9]);
}
if($logging eq '1' ){ $log='ON';}else{$log='';}
if($configline[10] eq 'on' && $configline[11] eq 'on' && $configline[12] eq 'on' && $configline[13] eq 'on' && $configline[14] eq 'on' && $configline[15] eq 'on' && $configline[16] eq 'on'){
if($configline[17] eq '00:00' && $configline[18] eq '00:00'){
$time='';