mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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:
parent
fe29fe04d3
commit
05b7eef94f
@ -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");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user