diff options
author | Olivier Blin <oblin@mandriva.com> | 2010-04-06 14:16:20 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2010-04-06 14:16:20 +0000 |
commit | ae6e1d5ff8e2589cf23673efe9969661a132b788 (patch) | |
tree | aa6eea7b87558b67439c94e25b90dc465c1c327e /rescue | |
parent | 8d8e41c312542e34d5e90c87efb9c6240492fe91 (diff) | |
download | drakx-ae6e1d5ff8e2589cf23673efe9969661a132b788.tar drakx-ae6e1d5ff8e2589cf23673efe9969661a132b788.tar.gz drakx-ae6e1d5ff8e2589cf23673efe9969661a132b788.tar.bz2 drakx-ae6e1d5ff8e2589cf23673efe9969661a132b788.tar.xz drakx-ae6e1d5ff8e2589cf23673efe9969661a132b788.zip |
image restore script: handle hybrid images (by matching main device)
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/NEWS | 1 | ||||
-rwxr-xr-x | rescue/restore-image.sh | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/rescue/NEWS b/rescue/NEWS index 5751ca5cb..951f566f8 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -1,4 +1,5 @@ - Handle LVM (#44723) +- image restore script: handle hybrid images (by matching main device) Version 1.16 - 9 October 2009, by Olivier "blino" Blin diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 99de39a27..4cf06c9e6 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -93,7 +93,8 @@ do you want to continue?" function detect_root() { - inst_source_dev=$(sed '\|'$restore_media'|!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts) + inst_source_dev=$(awk "\$2 == \"$restore_media\" { print \$1 }" /proc/mounts | sed -e 's/[0-9]$//') + inst_source_dev=${inst_source_dev#/dev/} devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${inst_source_dev} | awk '$3 > '$MIN_DISKSIZE' { print $4,$3 }') if [ -z "${devices}" ]; then |