the find that looks in /etc/backup.d didn't follow symlinks and would instead fail
authorMicah Anderson <micah@riseup.net>
Sat, 10 Jun 2006 13:40:22 +0000 (13:40 +0000)
committerMicah Anderson <micah@riseup.net>
Sat, 10 Jun 2006 13:40:22 +0000 (13:40 +0000)
silently causing me much confusion, so I added -L to find and an if statement to
spit something out so its obvious

ChangeLog
src/backupninja.in

index 7e97015417f624d6faefd9f11cff968d8648929f..2edbef947800a2089adcf496fe013cfac0f59b61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@ version 0.9.4 -- unreleased
           and complains about group-readable files only when the group differs
           from the one in the configuration file (default is root as before). 
           Thanks to Martin Krafft for the patch (Closes: #370396).
           and complains about group-readable files only when the group differs
           from the one in the configuration file (default is root as before). 
           Thanks to Martin Krafft for the patch (Closes: #370396).
+        . When determining which backup actions to make, find now follows
+          symlinks for /etc/backup.d
     handler changes
        Added tar handler
        mysql:
     handler changes
        Added tar handler
        mysql:
index 57936da1d4b2ce5a521dcbdae05c3ee7ed218aa7..16ac7a7dc5e5417ffeae1f64b23b427ea4a562f8 100755 (executable)
@@ -476,7 +476,11 @@ errormsg=""
 if [ "$singlerun" ]; then
        files=$singlerun
 else
 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
 fi
 
 for file in $files; do