]> oss.titaniummirror.com Git - ovzbpc.git/blobdiff - bpcdump
Have to eval when looking for oldest backup to remove so file globbing is done
[ovzbpc.git] / bpcdump
diff --git a/bpcdump b/bpcdump
index 1e1980fb4ff5aba8218cfc4e59f0f71ac3654999..1b5e88f56f287f8d3b660c90f8ae004772aa632d 100755 (executable)
--- 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"