summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-04-30 04:35:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-04-30 04:35:21 +0000
commit889044cad0dc25de4067415f13f6a5c0f482e2d0 (patch)
tree4de2dc91227ac3b6e2b0db1fd5bfa936d32ea205
parent40a1b7af9051e7d8bb9525f4a64ea966a97e3ef1 (diff)
downloadpfsense-889044cad0dc25de4067415f13f6a5c0f482e2d0.zip
pfsense-889044cad0dc25de4067415f13f6a5c0f482e2d0.tar.gz
Keep 5 backups on embedded. Keep 30 on full installations.
-rw-r--r--etc/inc/config.inc10
1 files changed, 3 insertions, 7 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 28f28f9..03be73c 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1099,13 +1099,9 @@ function write_config($desc="Unknown", $backup = true) {
fclose($fd);
if($g['platform'] == "embedded") {
- /* backup last config.xml and remove all others to avoid
- * filling up the compact flash dedicated config partition
- */
- $last_backup = discover_last_backup();
- mwexec("/bin/mv /cf/conf/backup/{$last_backup} /tmp/lastconfig.xml");
- mwexec("/bin/rm /cf/conf/backup/*");
- mwexec("/bin/mv /tmp/lastconfig.xml /cf/conf/backup/{$last_backup}");
+ cleanup_backupcache(5);
+ } else {
+ cleanup_backupcache(30);
}
if($g['booting'] <> true) {
OpenPOWER on IntegriCloud