From 492a3a24cace738e99db86ab82f23b7c470e0382 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 26 Feb 2009 14:49:14 +0000 Subject: use size*3 as uncompressed size heuristic for bzip2 --- rescue/restore-image.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rescue') 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 -- cgit v1.2.1