X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=src%2Fbackupninja.in;h=f68a315632f755ab03106a184e2897409ab1ca09;hp=f871e0c03e326fe832398dcfbc813a104564533b;hb=2bca36e49ce95bca1d2bb2d7aadb7fcd093b59fd;hpb=8fb9415609b3181d8522f42115508dd7a3643345 diff --git a/src/backupninja.in b/src/backupninja.in index f871e0c..f68a315 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -381,7 +381,7 @@ loglevel=3 while [ $# -ge 1 ]; do case $1 in -h|--help) usage;; - -d|--debug) debug=1;; + -d|--debug) debug=1; export BACKUPNINJA_DEBUG=yes;; -t|--test) test=1;debug=1;; -n|--now) processnow=1;; -f|--conffile) @@ -448,6 +448,7 @@ fi # include shared functions . $libdirectory/tools +. $libdirectory/array . $libdirectory/vserver setfile $conffile @@ -569,11 +570,11 @@ if [ $doit == 1 ]; then if [ "$reportspace" == "yes" ]; then previous="" for i in $(ls "$configdirectory"); do - backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}') - if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then - df -h "$backuploc" - previous="$backuploc" - fi + backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}') + if [ "$backuploc" != "$previous" -a -n "$backuploc" -a -d "$backuploc" ]; then + df -h "$backuploc" + previous="$backuploc" + fi done fi } | mail -s "backupninja: $hostname $subject" $reportemail