summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-11 11:53:40 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-11 11:53:40 +0000
commit96ccfe378887414c16d99896d5b4aefd68b617b7 (patch)
treed4655922871429f57f3c0fe29704d7ca8ab66b43 /etc
parent70ffd57b6d6acfeb3f04758c5303c72785931a4e (diff)
downloadpfsense-96ccfe378887414c16d99896d5b4aefd68b617b7.zip
pfsense-96ccfe378887414c16d99896d5b4aefd68b617b7.tar.gz
Match the logic with other functions.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/config.inc10
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);
}
OpenPOWER on IntegriCloud