diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-11-28 21:53:35 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-11-28 21:53:35 +0100 |
commit | 7b9dfd6b32ca3d54c723295334416bcc7e5deb8a (patch) | |
tree | 7a76ffec25b1ca5109c079b87a4ffedf4dc10e91 /etc/inc/rrd.inc | |
parent | 7966b0dff9985cca43912e53b0770f9a1c981b9a (diff) | |
download | pfsense-7b9dfd6b32ca3d54c723295334416bcc7e5deb8a.zip pfsense-7b9dfd6b32ca3d54c723295334416bcc7e5deb8a.tar.gz |
Correct some logic and remove temporary files
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index e058926..34366e1 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -64,7 +64,6 @@ function restore_rrd() { log_error("RRD restore failed exited with $rrdreturn, the error is: $rrdrestore\n"); return; } - unset($rrdrestore); foreach ($rrdrestore as $xml_file) { $rrd_file = '/' . substr($xml_file, 0, -4) . '.rrd'; if (file_exists("{$rrd_file}")) @@ -83,6 +82,8 @@ function restore_rrd() { unset($output); @unlink($xml_file); } + unset($rrdrestore); + @unlink("{$g['tmp_path']}/rrd_restore"); /* If this backup is still there on a full install, but we aren't going to use ram disks, remove the archive since this is a transition. */ if (($g['platform'] == "pfSense") && !isset($config['system']['use_mfs_tmpvar'])) { unlink_if_exists("{$g['cf_conf_path']}/rrd.tgz"); |