Hans de Goede wrote:
One of my last patches moved the checking for Volgroups to handledm,
however
when the root device is specified in fstab as /dev/VolGroup00/Volume00,
handledm never gets called, as neither /dev/VolGroup00/Volume00 nor
/sys/block/dm-X are recognized as being dm by findstoragedriver ()
This patch fixes findstoragedriver () to recognize atleast /sys/block/dm-X
as dm.
Looks fine, commit it.
p.s.
Why are we still calling findstoragedriver twice in cases like this ???
---
mkinitrd | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mkinitrd b/mkinitrd
index 6f06084..fb1cf3f 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -389,14 +389,14 @@ findstoragedriver () {
continue
fi
vecho "Looking for driver for device $device"
+ if [[ "$device" =~ ^/sys ]]; then
+ device=${device##*/}
+ fi
if [[ "$device" =~ ^(dm-|mapper/) ]]; then
majmin=$(get_numeric_dev dec "/dev/$device")
sysfs=$(finddevnoinsys $majmin)
handledm $(echo "$majmin" |cut -d : -f 1) $(echo "$majmin"
|cut -d : -f 2)
else
- if [[ "$device" =~ ^/sys ]]; then
- device=${device##*/}
- fi
sysfs=""
device=$(echo "$device" | sed 's,/,!,g')
if [ -d /sys/block/$device/ ]; then
--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list