diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 13:10:01 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 13:10:01 +0100 |
commit | 285ef132f7d671620f269a57d2ebcff585d2a493 (patch) | |
tree | b491fad66d22765d9640b2ac543c41b6e417a95d /etc/inc/upgrade_config.inc | |
parent | 32e834ffd3b4cc6cdc6b147c91cb6dbcb0a93288 (diff) | |
download | pfsense-285ef132f7d671620f269a57d2ebcff585d2a493.zip pfsense-285ef132f7d671620f269a57d2ebcff585d2a493.tar.gz |
Rather than set the g['booting'] on globals provide a function to test for that doing the right checks
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 83dcb5b..19e4363 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -2021,7 +2021,7 @@ function upgrade_054_to_055() { $xmldump = "{$database}.old.xml"; $xmldumpnew = "{$database}.new.xml"; - if ($g['booting']) + if (platform_booting()) echo "Migrate RRD database {$database} to new format for IPv6 \n"; mwexec("$rrdtool tune {$rrddbpath}{$database} -r roundtrip:delay 2>&1"); @@ -2057,7 +2057,7 @@ function upgrade_054_to_055() { $xmldumptmp = "{$database}.tmp.xml"; $xmldumpnew = "{$database}.new.xml"; - if ($g['booting']) + if (platform_booting()) echo "Migrate RRD database {$database} to new format \n"; /* rename DS source */ mwexec("$rrdtool tune {$rrddbpath}/{$database} -r in:inpass 2>&1"); @@ -2111,7 +2111,7 @@ function upgrade_054_to_055() { /* The function will restore the rrd.tgz so we will save it after */ exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /etc/rc.backup_rrd.sh"); unlink_if_exists("{$g['vardb_path']}/rrd/*.xml"); - if ($g['booting']) + if (platform_booting()) echo "Updating configuration..."; } @@ -2676,7 +2676,7 @@ function upgrade_080_to_081() { $xmldump = "{$database}.old.xml"; $xmldumpnew = "{$database}.new.xml"; - if ($g['booting']) + if (platform_booting()) echo "Migrate RRD database {$database} to new format for IPv6.\n"; /* dump contents to xml and move database out of the way */ @@ -2796,7 +2796,7 @@ function upgrade_080_to_081() { /* Let's save the RRD graphs after we run enable RRD graphing */ /* The function will restore the rrd.tgz so we will save it after */ exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /etc/rc.backup_rrd.sh"); - if ($g['booting']) + if (platform_booting()) echo "Updating configuration..."; foreach($config['filter']['rule'] as & $rule) { if (isset($rule['protocol']) && !empty($rule['protocol'])) @@ -3119,7 +3119,7 @@ function upgrade_095_to_096() { $databases = return_dir_as_array($rrddbpath, '/-(traffic|packets)\.rrd$/'); rsort($databases); foreach($databases as $database) { - if ($g['booting']) + if (platform_booting()) echo "Update RRD database {$database}.\n"; $cmd = "{$rrdtool} tune {$rrddbpath}/{$database}"; |