mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Move special case fixes before we return so that it can be processed.
This commit is contained in:
parent
adcda2839d
commit
a984fffd87
@ -483,6 +483,18 @@ function conf_mount_ro() {
|
||||
function convert_config() {
|
||||
global $config, $g;
|
||||
|
||||
/* special case upgrades */
|
||||
/* fix every minute crontab bogons entry */
|
||||
$cron_item_count = count($config['cron']['item']);
|
||||
for($x=0; $x<$cron_item_count; $x++) {
|
||||
if(stristr($config['cron']['item'][$x]['command'], "rc.update_bogons.sh")) {
|
||||
if($config['cron']['item'][$x]['hour'] == "*" ) {
|
||||
$config['cron']['item'][$x]['hour'] = "2";
|
||||
write_config("Updated bogon update frequency to 2am");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['version'] == $g['latest_config'])
|
||||
return; /* already at latest version */
|
||||
|
||||
@ -1001,18 +1013,6 @@ function convert_config() {
|
||||
$config['version'] = "3.0";
|
||||
}
|
||||
|
||||
/* special case upgrades */
|
||||
/* fix every minute crontab bogons entry */
|
||||
$cron_item_count = count($config['cron']['item']);
|
||||
for($x=0; $x<$cron_item_count; $x++) {
|
||||
if(stristr($config['cron']['item'][$x]['command'], "rc.update_bogons.sh")) {
|
||||
if($config['cron']['item'][$x]['hour'] == "*" ) {
|
||||
$config['cron']['item'][$x]['hour'] = "2";
|
||||
write_config("Updated bogon update frequency to 2am");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($prev_version != $config['version'])
|
||||
write_config("Upgraded config version level from {$prev_version} to {$config['version']}");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user