From b27a22ff8c269b6f594bf27b337f997c000fede3 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 26 Feb 2009 15:16:52 +0000 Subject: use bytes as unit --- rescue/restore-image.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'rescue/restore-image.sh') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index b923a7a93..ed7d1acca 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -278,16 +278,7 @@ function write_image() ps | grep -q $pid if [ $? -eq 0 ]; then /bin/kill -SIGUSR1 $pid - unit=$(tail -n 1 /tmp/backup.out | \ - cut -d'(' -f2 | cut -d')' -f1 |\ - awk '{ print $2 }') - - complete=$(tail -n 1 /tmp/backup.out | \ - cut -d'(' -f2 | cut -d')' -f1 | \ - awk '{ print $1 }' | cut -d'.' -f1) - if [ x"$unit" = x"GB" ]; then - complete=$((complete*1000)) - fi + complete=$(tail -n 1 /tmp/backup.out | awk '{ print $1 }') echo $((complete*100/total)) sleep 1 else -- cgit v1.2.1