Index: openacs-4/etc/backup.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/backup.sh,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/etc/backup.sh 20 Feb 2006 19:39:55 -0000 1.11.2.2 +++ openacs-4/etc/backup.sh 26 Feb 2006 17:41:20 -0000 1.11.2.3 @@ -89,7 +89,7 @@ #--------------------------------------------------------------------- # Parse command line #--------------------------------------------------------------------- - +TYPE="" case $1 in --full) TYPE="full" @@ -123,11 +123,12 @@ # Check for free space #--------------------------------------------------------------------- # get free byte count - -# if you're having trouble with this, it may be because your partition -# string is too long and is forcing the numbers to be printed on the -# next line (common with LVs). Add 1 line of context to grep's output -# (-A 1) and ask awk to print the 3rd token instead. free=`df | grep $BACKUPPART | awk '{print $4}'` +if [ "$free" = "" ] + then + # BACKUPPART may be too long, causing df output to wrap, let's try another method + free=`df | grep -A 1 $BACKUPPART | awk '{print $3}' | sed /^$/d` +fi # force to incremental if there isn't room for full if [ $free -lt `expr $FULL_SPACE_FREE \* 1024 \* 1024` ];