summaryrefslogtreecommitdiffstats
path: root/rescue/restore-image.sh
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-11 14:30:17 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-11 14:30:17 +0000
commit63d58dd063b4565724f0b252bef30ec5ae3a4b6b (patch)
treee94da2ff4c224826269d99e94600dfa63e60d8a6 /rescue/restore-image.sh
parenta7c2862517cdd11f670f7c5dc8381883cb1e3083 (diff)
downloaddrakx-backup-do-not-use-63d58dd063b4565724f0b252bef30ec5ae3a4b6b.tar
drakx-backup-do-not-use-63d58dd063b4565724f0b252bef30ec5ae3a4b6b.tar.gz
drakx-backup-do-not-use-63d58dd063b4565724f0b252bef30ec5ae3a4b6b.tar.bz2
drakx-backup-do-not-use-63d58dd063b4565724f0b252bef30ec5ae3a4b6b.tar.xz
drakx-backup-do-not-use-63d58dd063b4565724f0b252bef30ec5ae3a4b6b.zip
add new_win32_size variable
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-xrescue/restore-image.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 7aac5c74e..c8b32f628 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -145,6 +145,8 @@ function detect_and_resize_win32()
used=$(echo ${size} | awk '{ print $3 }')
left=$(echo ${size} | awk '{ print $4 }')
avail=$((${left}/2))
+ # our install takes half of 'left'
+ new_win32_size=$(($((${used}+${avail}))*2))
if [ ! ${avail} -lt ${MIN_DISKSIZE} ]; then
# get the next partition integer
@@ -157,8 +159,8 @@ function detect_and_resize_win32()
hpfs) device_id=87 ;;
esac
- # wrapper around libdrakx by blino (it takes half of 'left')
- diskdrake-resize ${device} ${device_type} $(($((${used}+${avail}))*2)) &>/dev/null
+ # wrapper around libdrakx by blino
+ diskdrake-resize ${device} ${device_type} ${new_win32_size} &>/dev/null
# we need some free sector here, rebuilding layout
fdisk /dev/${disk} &>/dev/null <<EOF