summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-26 14:49:14 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-26 14:49:14 +0000
commit492a3a24cace738e99db86ab82f23b7c470e0382 (patch)
tree0b386f432578bfb5993ca8f6d69efe8349a8edce /rescue
parent5b177376812a198be11e5ab72a953754476e5ec8 (diff)
downloaddrakx-492a3a24cace738e99db86ab82f23b7c470e0382.tar
drakx-492a3a24cace738e99db86ab82f23b7c470e0382.tar.gz
drakx-492a3a24cace738e99db86ab82f23b7c470e0382.tar.bz2
drakx-492a3a24cace738e99db86ab82f23b7c470e0382.tar.xz
drakx-492a3a24cace738e99db86ab82f23b7c470e0382.zip
use size*3 as uncompressed size heuristic for bzip2
Diffstat (limited to 'rescue')
-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 ba9400906..b923a7a93 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -248,7 +248,6 @@ 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
@@ -256,9 +255,11 @@ function write_image()
;;
bz2)
uncomp=bzcat
+ total=$((imagesize * 3))
;;
*)
uncomp=cat
+ total=$imagesize
;;
esac