diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-02-11 14:28:51 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-02-11 14:28:51 +0000 |
commit | a7c2862517cdd11f670f7c5dc8381883cb1e3083 (patch) | |
tree | 18d78a18a4a81e7c564fe7c6435f926a2fddc3c3 /rescue | |
parent | e2814a55f68ba2010f7e94f71f1df293bfe0ab64 (diff) | |
download | drakx-backup-do-not-use-a7c2862517cdd11f670f7c5dc8381883cb1e3083.tar drakx-backup-do-not-use-a7c2862517cdd11f670f7c5dc8381883cb1e3083.tar.gz drakx-backup-do-not-use-a7c2862517cdd11f670f7c5dc8381883cb1e3083.tar.bz2 drakx-backup-do-not-use-a7c2862517cdd11f670f7c5dc8381883cb1e3083.tar.xz drakx-backup-do-not-use-a7c2862517cdd11f670f7c5dc8381883cb1e3083.zip |
add first_disk variable
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/restore-image.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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}" |