PATCH: Recognize /sys/block/dm-X as a devicemapper dev (and thus call handledm)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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
--
1.6.1.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux