diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 04:35:29 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 04:35:29 +0000 |
commit | ac0dcb5002c451c6032cbe0fd7a18216c33bf025 (patch) | |
tree | 44f5f32e702542f2ceab7b36f7af876d91ca4b9d /etc/inc/config.inc | |
parent | 05a85e29afb23c2e3491f038a2784a7ecd0dec35 (diff) | |
download | pfsense-ac0dcb5002c451c6032cbe0fd7a18216c33bf025.zip pfsense-ac0dcb5002c451c6032cbe0fd7a18216c33bf025.tar.gz |
Keep 5 backups on embedded. Keep 30 on full installations.
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 5a21532..a8e3950 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1045,13 +1045,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) { |