summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-08-14 18:56:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-08-14 18:56:53 +0000
commit103334168c62e49084387fd5481e955ccc20f0ac (patch)
treefd60d9676bb8302db622d0e0913b29bd99c8bbb3 /etc
parent525ae1e7e2ab12f1903eb27f5300159c2e2cde36 (diff)
downloadpfsense-103334168c62e49084387fd5481e955ccc20f0ac.zip
pfsense-103334168c62e49084387fd5481e955ccc20f0ac.tar.gz
Correctly discover last backup.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/config.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 5f21c30..f97415d 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -268,10 +268,11 @@ function generate_config_cache($config) {
}
function discover_last_backup() {
- $backups = split("\n", `cd /cf/conf/backup && ls -ltr *.xml | awk '{print \$9}' | grep -v "\\.\\."`);
+ $backups = split("\n", `cd /cf/conf/backup && ls -ltr *.xml | awk '{print \$9}'`);
$last_backup = "";
foreach($backups as $backup)
- $last_backup = $backup;
+ if($backup)
+ $last_backup = $backup;
return $last_backup;
}
OpenPOWER on IntegriCloud