From 40aba93d472f4e2acd157623b9c2aafd92e084dc Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 11 Feb 2009 15:30:58 +0000 Subject: resize win32 in write_image --- rescue/restore-image.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'rescue') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index b42ed15b6..3886f0c77 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -99,7 +99,7 @@ function detect_root() win32_part_dev= # win32 detection won't handle complex layouts if [ "${devs_found}" = 1 ]; then - root=$(detect_and_resize_win32 ${inst_source_dev}) + root=$(detect_win32 ${inst_source_dev}) fi if [ -z "${root}" ]; then @@ -123,7 +123,7 @@ function detect_root() echo "${root}" } -function detect_and_resize_win32() +function detect_win32() { # from detect_root() skip_dev=${1} @@ -156,7 +156,7 @@ function detect_and_resize_win32() win32_part_type=${device_type} # our install takes half of 'left' win32_part_new_size=$(($((${used}+${avail}))*2)) - resize_win32 ${win32_part_dev} ${win32_part_type} ${win32_part_new_size} + disk=${device%[0-9]} number=$(echo ${device} | sed 's@/dev/...@@g') echo "${disk}${number}" @@ -220,6 +220,10 @@ function write_image() welcome root=$(detect_root) fi + + if [ -n "${win32_part_dev}" ]; then + resize_win32 ${win32_part_dev} ${win32_part_type} ${win32_part_new_size} + fi image=$(cat $images_dir/list | cut -d ',' -f 3) extension=$(echo $image | cut -d '.' -f 3) -- cgit v1.2.1