diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-11 11:53:40 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-11 11:53:40 +0000 |
commit | 96ccfe378887414c16d99896d5b4aefd68b617b7 (patch) | |
tree | d4655922871429f57f3c0fe29704d7ca8ab66b43 /etc/inc | |
parent | 70ffd57b6d6acfeb3f04758c5303c72785931a4e (diff) | |
download | pfsense-96ccfe378887414c16d99896d5b4aefd68b617b7.zip pfsense-96ccfe378887414c16d99896d5b4aefd68b617b7.tar.gz |
Match the logic with other functions.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/config.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 7f84a7f..9bf18dc 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -608,9 +608,9 @@ function write_config($desc="Unknown", $backup = true) { fclose($fd); if($g['platform'] == "embedded") { - cleanup_backupcache(5, false); + cleanup_backupcache(5, true); } else { - cleanup_backupcache(30, false); + cleanup_backupcache(30, true); } /* re-read configuration */ @@ -1150,11 +1150,11 @@ EOD; } } -function cleanup_backupcache($revisions = 30, $lock = true) { +function cleanup_backupcache($revisions = 30, $lock = false) { global $g; $i = false; - if ($lock) + if (!$lock) $lockkey = lock('config'); if(file_exists($g['cf_conf_path'] . '/backup/backup.cache')) { conf_mount_rw(); @@ -1215,7 +1215,7 @@ function cleanup_backupcache($revisions = 30, $lock = true) { } if($g['booting'] && $i) print "done.\n"; - if ($lock) + if (!$lock) unlock($lockkey); } |