diff options
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 |