diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-02-26 15:16:52 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-02-26 15:16:52 +0000 |
commit | b27a22ff8c269b6f594bf27b337f997c000fede3 (patch) | |
tree | 1c4fd23022543c8f5af38ede0081efaa1a68d8a5 /rescue | |
parent | 492a3a24cace738e99db86ab82f23b7c470e0382 (diff) | |
download | drakx-backup-do-not-use-b27a22ff8c269b6f594bf27b337f997c000fede3.tar drakx-backup-do-not-use-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.gz drakx-backup-do-not-use-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.bz2 drakx-backup-do-not-use-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.xz drakx-backup-do-not-use-b27a22ff8c269b6f594bf27b337f997c000fede3.zip |
use bytes as unit
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/restore-image.sh | 11 |
1 files changed, 1 insertions, 10 deletions
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 |