diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-02-11 15:07:31 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-02-11 15:07:31 +0000 |
commit | d1d6c38ffec93c60598d063a7f89366ed7b75243 (patch) | |
tree | 688195e849a4a7a9b3155da54bbf145e2ec66796 | |
parent | b69de005c0af4ba87dc5e503d780522d72c8b8c1 (diff) | |
download | drakx-backup-do-not-use-d1d6c38ffec93c60598d063a7f89366ed7b75243.tar drakx-backup-do-not-use-d1d6c38ffec93c60598d063a7f89366ed7b75243.tar.gz drakx-backup-do-not-use-d1d6c38ffec93c60598d063a7f89366ed7b75243.tar.bz2 drakx-backup-do-not-use-d1d6c38ffec93c60598d063a7f89366ed7b75243.tar.xz drakx-backup-do-not-use-d1d6c38ffec93c60598d063a7f89366ed7b75243.zip |
run detect_and_resize_win32 first (to move more logic inside)
-rwxr-xr-x | rescue/restore-image.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index f03831881..08741c9e7 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -103,7 +103,11 @@ function detect_root() first_win32_part_dev=$(grep -e "FAT\|NTFS\|HPFS" /tmp/fdisk.log | tail -1 | sed 's/ .*$//') set +f - if [ -z "${first_win32_part_dev}" ]; then + if [ -n "${first_win32_part_dev}" ]; then + root=$(detect_and_resize_win32 $first_disk $first_win32_part_dev) + fi + + if [ -z "${root}" ]; then rm -rf /tmp/fdisk.log if [ "$devs_found" -gt "2" ]; then if [ ! -z ${dev} ]; then @@ -120,8 +124,6 @@ function detect_root() else root=$first_disk fi - else - root=$(detect_and_resize_win32 $first_disk $first_win32_part_dev) fi echo "${root}" @@ -155,14 +157,9 @@ 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} - else - rm -f /tmp/fdisk.log + echo "${disk}${number}" fi - else - rm -f /tmp/fdisk.log fi - - echo "${disk}${number}" } function resize_win32() |