summaryrefslogtreecommitdiffstats
path: root/rescue/restore-image.sh
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-04-06 14:16:20 +0000
committerOlivier Blin <oblin@mandriva.com>2010-04-06 14:16:20 +0000
commitae6e1d5ff8e2589cf23673efe9969661a132b788 (patch)
treeaa6eea7b87558b67439c94e25b90dc465c1c327e /rescue/restore-image.sh
parent8d8e41c312542e34d5e90c87efb9c6240492fe91 (diff)
downloaddrakx-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/restore-image.sh')
-rwxr-xr-xrescue/restore-image.sh3
1 files changed, 2 insertions, 1 deletions
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