summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-26 14:35:02 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-26 14:35:02 +0000
commite505224a6bec8de07f93df4d3c81be4f17babf84 (patch)
tree09901f8ddd06784350c61716b7048dbbc44593ab
parent2b99f6420f38fcf44ce1acfe56590db714259e21 (diff)
downloaddrakx-e505224a6bec8de07f93df4d3c81be4f17babf84.tar
drakx-e505224a6bec8de07f93df4d3c81be4f17babf84.tar.gz
drakx-e505224a6bec8de07f93df4d3c81be4f17babf84.tar.bz2
drakx-e505224a6bec8de07f93df4d3c81be4f17babf84.tar.xz
drakx-e505224a6bec8de07f93df4d3c81be4f17babf84.zip
better estimate of image size
-rwxr-xr-xrescue/restore-image.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 32e1cc178..e762f618b 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -247,6 +247,8 @@ function write_image()
image=$(cat $images_dir/list | cut -d ',' -f 3)
extension=$(echo $image | cut -d '.' -f 3)
+ imagesize=$(ls -l $images_dir/$image | awk '{ print $5 }')
+ total=$imagesize
case $extension in
gz)
uncomp=zcat
@@ -269,7 +271,6 @@ function write_image()
sleep 3
pid=$(ps ax | grep 'dd bs=4M of' | grep -v grep | awk '{ print $1 }')
- total=1000
while [ true ]; do
ps | grep -q $pid