summaryrefslogtreecommitdiffstats
path: root/rescue/restore-image.sh
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-26 15:16:52 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-26 15:16:52 +0000
commitb27a22ff8c269b6f594bf27b337f997c000fede3 (patch)
tree1c4fd23022543c8f5af38ede0081efaa1a68d8a5 /rescue/restore-image.sh
parent492a3a24cace738e99db86ab82f23b7c470e0382 (diff)
downloaddrakx-b27a22ff8c269b6f594bf27b337f997c000fede3.tar
drakx-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.gz
drakx-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.bz2
drakx-b27a22ff8c269b6f594bf27b337f997c000fede3.tar.xz
drakx-b27a22ff8c269b6f594bf27b337f997c000fede3.zip
use bytes as unit
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-xrescue/restore-image.sh11
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