diff options
author | Micah Anderson <micah@riseup.net> | 2006-06-10 13:40:22 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2006-06-10 13:40:22 +0000 |
commit | f07f4b873b5d4b0dbe18df8cd6078826b2a0afd1 (patch) | |
tree | 176ae1e3d9b0b63ed6f651d8579d1e7c51f53e57 /src/backupninja.in | |
parent | fe7ee521a660ef38e5657c31eefb14b95f22827f (diff) | |
download | backupninja-f07f4b873b5d4b0dbe18df8cd6078826b2a0afd1.tar.gz backupninja-f07f4b873b5d4b0dbe18df8cd6078826b2a0afd1.tar.bz2 |
the find that looks in /etc/backup.d didn't follow symlinks and would instead fail
silently causing me much confusion, so I added -L to find and an if statement to
spit something out so its obvious
Diffstat (limited to 'src/backupninja.in')
-rwxr-xr-x | src/backupninja.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backupninja.in b/src/backupninja.in index 57936da..16ac7a7 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -476,7 +476,11 @@ errormsg="" if [ "$singlerun" ]; then files=$singlerun else - files=`find $configdirectory -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n` + files=`find -L $configdirectory -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n` + + if [ -z "$files" ]; then + fatal "No backup actions configured in '$configdirectory', run ninjahelper!" + fi fi for file in $files; do |