diff options
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index ebbfd6932..61cda588a 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -102,11 +102,7 @@ function detect_root() devs_found=$(($(echo $devices | wc -w)/2)) - root_data= - # win32 detection won't handle complex layouts - if [ "${devs_found}" = 1 ]; then - root_data=$(detect_win32 ${inst_source_dev}) - fi + root_data=$(detect_win32 ${inst_source_dev}) if [ -z "${root_data}" ]; then if [ "$devs_found" -gt "1" ]; then @@ -134,6 +130,11 @@ function detect_win32() # from detect_root() skip_dev=${1} + # win32 detection won't handle complex layouts + if [ $(fdisk -l | grep "^/dev/" | grep -v ${skip_dev} | wc -l) -gt 1 ]; then + exit + fi + # get the last created windows partition information set -f device=$(fdisk -l | grep "^/dev/" | grep -v ${skip_dev} | grep -e "FAT\|NTFS\|HPFS" | tail -1 | sed 's/ .*$//') |