]> oss.titaniummirror.com Git - ovzbpc.git/commitdiff
Have to eval when looking for oldest backup to remove so file globbing is done
authorsmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Fri, 11 Apr 2008 17:20:29 +0000 (17:20 +0000)
committersmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Fri, 11 Apr 2008 17:20:29 +0000 (17:20 +0000)
by the shell.

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"