bugfix: Settings set to 0(off/disabled) are not copied over during OTA.

Some settings would not copy correctly and would fall back to the config default due to faulty if checks logic when the value was set to 0 ending up in if(0) checks.
This commit is contained in:
Conrad Lara - KG6JEI 2015-11-15 10:59:17 -08:00
parent 1ae6aafcc5
commit 854a536629
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ foreach $config ("ap","client","mesh","mesh_ap","router")
foreach $variable( sort keys %defaultcfg )
{
if ( $cfg{$variable} )
if ( defined $cfg{$variable} )
{
print TMPCONFFILE "$variable = $cfg{$variable}\n";
}
@ -61,7 +61,7 @@ foreach $config ("ap","client","mesh","mesh_ap","router")
# Specific settings for variables that are not in the default config but are added by the system
foreach $variable( 'dmz_dhcp_end', 'dmz_dhcp_limit', 'dmz_dhcp_start', 'dmz_lan_ip', 'dmz_lan_mask', 'wifi_rxant', 'wifi_txant' )
{
if ( $cfg{$variable} )
if ( defined $cfg{$variable} )
{
print TMPCONFFILE "$variable = $cfg{$variable}\n";
}