diff options
author | jim-p <jimp@pfsense.org> | 2013-03-11 22:16:18 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-03-11 22:16:18 -0400 |
commit | e92e83d4e2e3465bca9ca6d3cc4f746ef6566476 (patch) | |
tree | b72aaf0e1c0b2130b62c28ff7c6ed84076569f64 /etc/inc/rrd.inc | |
parent | 94ca4e0d47cf61b8e8c812ca3dc18356fc166fb0 (diff) | |
download | pfsense-e92e83d4e2e3465bca9ca6d3cc4f746ef6566476.zip pfsense-e92e83d4e2e3465bca9ca6d3cc4f746ef6566476.tar.gz |
Add the ability for full installs to optionally use RAM disks for /tmp and /var, and to allow selecting a size for /tmp and /var RAM disks on both Full installs and NanoBSD.
I think I caught most of the edge cases for transitioning into and out of RAM disk mode, and preserving data across reboots as is done on NanoBSD (RRD, DHCP leases, pkg/pbi info).
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 6f44396..2566b8d 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -78,6 +78,10 @@ function restore_rrd() { } unlink($xml_file); } + /* 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"); + } return true; } return false; @@ -270,9 +274,7 @@ function enable_rrd_graphing() { chown($rrddbpath, "nobody"); if ($g['booting']) { - if ($g['platform'] != "pfSense") { - restore_rrd(); - } + restore_rrd(); } /* db update script */ |