Only restore rrd.tgz where platform is appropriate, or RAM disk being

used, otherwise you're restoring a probably old backup file. Ticket #4531
This commit is contained in:
Chris Buechler 2015-04-08 18:45:37 -05:00
parent fe29fe04d3
commit 05b7eef94f

View File

@ -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");
}
?>
?>