diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index f7c5240..a78c393 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -2653,6 +2653,14 @@ function upgrade_080_to_081() { $rrddbpath = "/var/db/rrd/"; $rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool"; + if ($g['platform'] != "pfSense") { + /* restore the databases, if we have one */ + if (restore_rrd()) { + /* Make sure to move the rrd backup out of the way. We will make a new one after converting. */ + exec("/bin/mv {$g['cf_conf_path']}/rrd.tgz {$g['cf_conf_path']}/backup"); + } + } + $rrdinterval = 60; $valid = $rrdinterval * 2; @@ -2782,6 +2790,9 @@ function upgrade_080_to_081() { } enable_rrd_graphing(); + /* 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']) echo "Updating configuration..."; foreach($config['filter']['rule'] as & $rule) { @@ -3092,6 +3103,14 @@ function upgrade_095_to_096() { $rrddbpath = "/var/db/rrd"; $rrdtool = "/usr/local/bin/rrdtool"; + if ($g['platform'] != "pfSense") { + /* restore the databases, if we have one */ + if (restore_rrd()) { + /* Make sure to move the rrd backup out of the way. We will make a new one after converting. */ + exec("/bin/mv {$g['cf_conf_path']}/rrd.tgz {$g['cf_conf_path']}/backup"); + } + } + /* Assume 2*10GigE for now */ $stream = 2500000000; @@ -3109,6 +3128,9 @@ function upgrade_095_to_096() { } enable_rrd_graphing(); + /* 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"); } function upgrade_096_to_097() { |