diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-02-11 15:19:36 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-02-11 15:19:36 +0000 |
commit | 0b7d60ca59f0d33facd292513fe392e303bce9fe (patch) | |
tree | 70b161613cd4a5789a35582561af4558d5da9980 /rescue/restore-image.sh | |
parent | 961bab422ee04aaed1eeb73dd915e3b9c6e6bb11 (diff) | |
download | drakx-backup-do-not-use-0b7d60ca59f0d33facd292513fe392e303bce9fe.tar drakx-backup-do-not-use-0b7d60ca59f0d33facd292513fe392e303bce9fe.tar.gz drakx-backup-do-not-use-0b7d60ca59f0d33facd292513fe392e303bce9fe.tar.bz2 drakx-backup-do-not-use-0b7d60ca59f0d33facd292513fe392e303bce9fe.tar.xz drakx-backup-do-not-use-0b7d60ca59f0d33facd292513fe392e303bce9fe.zip |
compute disk
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index ef967473e..837c7821a 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -106,7 +106,7 @@ function detect_root() # won't handle complex layouts if [ ! $(grep "^/dev" /tmp/fdisk.log | wc -l) -gt 1 ]; then if [ -n "${first_win32_part_dev}" ]; then - root=$(detect_and_resize_win32 $first_disk $first_win32_part_dev) + root=$(detect_and_resize_win32 $first_win32_part_dev) fi fi @@ -135,8 +135,7 @@ function detect_root() function detect_and_resize_win32() { # from detect_root() - disk=${1} - device=${2} + device=${1} # it might be needed, for safety device_type=$(vol_id --type ${device}) @@ -158,7 +157,8 @@ function detect_and_resize_win32() # 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} - number=$(echo ${win32_part_dev} | sed 's@/dev/...@@g') + disk=${device%[0-9]} + number=$(echo ${device} | sed 's@/dev/...@@g') echo "${disk}${number}" fi } |