From 05b7eef94f28fc73dcd07faa322e8d569f6938ea Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 8 Apr 2015 18:45:37 -0500 Subject: Only restore rrd.tgz where platform is appropriate, or RAM disk being used, otherwise you're restoring a probably old backup file. Ticket #4531 --- etc/inc/rrd.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index c620419..0e3dfd6 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -55,7 +55,7 @@ function restore_rrd() { $rrdrestore = ""; $rrdreturn = ""; - if (file_exists("{$g['cf_conf_path']}/rrd.tgz")) { + if (file_exists("{$g['cf_conf_path']}/rrd.tgz") && (isset($config['system']['use_mfs_tmpvar']) || $g['platform'] != "pfSense")) { foreach (glob("{$rrddbpath}/*.xml") as $xml_file) { @unlink($xml_file); } @@ -980,4 +980,4 @@ function kill_traffic_collector() { killbypid("{$g['varrun_path']}/updaterrd.sh.pid"); } -?> +?> \ No newline at end of file -- cgit v1.1