]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:get_persistent_dev() exception for multipath devices
authorHarald Hoyer <harald@redhat.com>
Fri, 28 Sep 2012 09:13:20 +0000 (11:13 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 28 Sep 2012 13:29:47 +0000 (15:29 +0200)
An exception is multipath devices, child and top layer device may have
same uuid. As dm devices maintain /dev/mapper/* as persistent names,
just do not doing converting for them.

dracut-functions.sh

index cdadacdf008d575b04a2a351a8bf18e3392fb4b4..1b896833a199573cc9cefedc045a863bff54d0ea 100755 (executable)
@@ -245,7 +245,7 @@ get_persistent_dev() {
     _dev=$(udevadm info --query=name --name="$1" 2>/dev/null)
     [ -z "$_dev" ] && return
 
-    for i in /dev/disk/by-uuid/* /dev/disk/by-id/*; do
+    for i in /dev/mapper/* /dev/disk/by-uuid/* /dev/disk/by-id/*; do
         _tmp=$(udevadm info --query=name --name="$i" 2>/dev/null)
         if [ "$_tmp" = "$_dev" ]; then
             echo $i