From a7c2862517cdd11f670f7c5dc8381883cb1e3083 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 11 Feb 2009 14:28:51 +0000 Subject: add first_disk variable --- rescue/restore-image.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rescue/restore-image.sh') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 10bde44e0..7aac5c74e 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -93,6 +93,7 @@ function detect_root() devs_found=$(echo $devices | wc -w) # we might use it later again fdisk -l | grep "^/dev/" | grep -v ${dev} > /tmp/fdisk.log + first_disk=$(echo ${devices} | cut -d ' ' -f 1) if ! grep -qe "FAT\|NTFS\|HPFS" /tmp/fdisk.log; then rm -rf /tmp/fdisk.log @@ -109,10 +110,10 @@ function detect_root() fi fi else - root=$(echo ${devices} | cut -d ' ' -f 1) + root=$first_disk fi else - root=$(detect_and_resize_win32 $(echo ${devices} | cut -d ' ' -f 1)) + root=$(detect_and_resize_win32 $first_disk) fi echo "${root}" -- cgit v1.2.1