X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=src%2Fbackupninja.in;h=6dee3b6163c4920a06e34f95c0e3ebe831277272;hp=75b892af5f4a7b19d2ec23a3cb859d449f4433f4;hb=4506202ea78d5c5829113d6f2a183c540585cd5d;hpb=c0ca5e3ddaee51add13199ef11e892162c788da5 diff --git a/src/backupninja.in b/src/backupninja.in index 75b892a..6dee3b6 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -98,7 +98,7 @@ function printmsg() { function logmsg() { if [ -w "$logfile" ]; then - echo -e `date "+%h %d %H:%M:%S"` "$@" >> $logfile + echo -e `LC_ALL=C date "+%h %d %H:%M:%S"` "$@" >> $logfile fi } @@ -180,7 +180,7 @@ function check_perms() { # simple lowercase function function tolower() { - echo "$1" | tr [:upper:] [:lower:] + echo "$1" | tr '[:upper:]' '[:lower:]' } # simple to integer function @@ -200,9 +200,9 @@ function toint() { # we grab the current time once, since processing # all the configs might take more than an hour. -nowtime=`date +%H` -nowday=`date +%d` -nowdayofweek=`date +%A` +nowtime=`LC_ALL=C date +%H` +nowday=`LC_ALL=C date +%d` +nowdayofweek=`LC_ALL=C date +%A` nowdayofweek=`tolower "$nowdayofweek"` function isnow() { @@ -561,7 +561,7 @@ if [ $doit == 1 ]; then previous="" for i in $(ls "$configdirectory"); do backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}') - if [ "$backuploc" != "$previous" ]; then + if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then df -h "$backuploc" previous="$backuploc" fi