From: smckown Date: Fri, 11 Apr 2008 17:20:29 +0000 (+0000) Subject: Have to eval when looking for oldest backup to remove so file globbing is done X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=3416ac172770b7b53cc3694bf31d10d2e3bab2b3;p=ovzbpc.git Have to eval when looking for oldest backup to remove so file globbing is done by the shell. --- diff --git a/bpcdump b/bpcdump index 1e1980f..1b5e88f 100755 --- a/bpcdump +++ b/bpcdump @@ -121,7 +121,7 @@ fi # Before we begin writing, remove old backup dirs until we have room dstblks=$(df -P "$EXTFS" | grep "$EXTFS" | awk '{ print $4 }') while [ $dstblks -le $srcblks ]; do - oldest=$(cd $EXTFS && ls -ltd "ve${VEID}*" 2>/dev/null | tail -1 | \ + oldest=$(cd $EXTFS && eval ls -ltd "ve${VEID}*" 2>/dev/null | tail -1 | \ awk '{ print $8 }') if [ -d "$oldest" ]; then echo "Removing old backup $oldest from $EXTFS"