diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-08-14 18:56:53 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-08-14 18:56:53 +0000 |
commit | 103334168c62e49084387fd5481e955ccc20f0ac (patch) | |
tree | fd60d9676bb8302db622d0e0913b29bd99c8bbb3 /etc/inc/config.inc | |
parent | 525ae1e7e2ab12f1903eb27f5300159c2e2cde36 (diff) | |
download | pfsense-103334168c62e49084387fd5481e955ccc20f0ac.zip pfsense-103334168c62e49084387fd5481e955ccc20f0ac.tar.gz |
Correctly discover last backup.
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 5 |
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; } |