summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-11 15:30:58 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-11 15:30:58 +0000
commit40aba93d472f4e2acd157623b9c2aafd92e084dc (patch)
treee3ae9c1fa8bdbb96e4a5b5eb2691ceae0bad804c /rescue
parent89c3f7667e209f54c2bace2c67b9a4e143edadfd (diff)
downloaddrakx-backup-do-not-use-40aba93d472f4e2acd157623b9c2aafd92e084dc.tar
drakx-backup-do-not-use-40aba93d472f4e2acd157623b9c2aafd92e084dc.tar.gz
drakx-backup-do-not-use-40aba93d472f4e2acd157623b9c2aafd92e084dc.tar.bz2
drakx-backup-do-not-use-40aba93d472f4e2acd157623b9c2aafd92e084dc.tar.xz
drakx-backup-do-not-use-40aba93d472f4e2acd157623b9c2aafd92e084dc.zip
resize win32 in write_image
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/restore-image.sh10
1 files changed, 7 insertions, 3 deletions
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)