Author: wiget
Date: Thu Feb  3 11:41:23 2011
New Revision: 12106

Modified:
   geninitrd/trunk/functions
Log:
Use DM subsystem name not UUID for LVM/crypt detection

Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions   (original)
+++ geninitrd/trunk/functions   Thu Feb  3 11:41:23 2011
@@ -75,9 +75,9 @@
 
        case $rootdev in
        /dev/mapper/*)
-               local dm_uuid=$(dm_uuid "$rootdev")
-               case $dm_uuid in
-               LVM-*)
+               local dm_subsystem=$(dm_subsystem "$rootdev")
+               case $dm_subsystem in
+               LVM)
                        local node
                        node=$(dm_lvm2_name "$rootdev") || return 1
                        if [ "$node" ]; then
@@ -85,7 +85,7 @@
                        fi
                        return 0
                        ;;
-               CRYPT-*)
+               CRYPT)
                        return 0
                        ;;
                esac
@@ -152,12 +152,12 @@
        dmsetup info -c --noheadings $node | awk -F: '{print $1}'
 }
 
-# get UUID for DM node
+# get subsystem name for DM node
 # node can be /dev/dm-0, /dev/mapper/name
-# @return      UUID
-dm_uuid() {
+# @return      subsystem name
+dm_subsystem() {
        local node="$1"
-       dmsetup info -c --noheadings $node | awk -F: '{print $8}'
+       dmsetup info -c --noheadings -o subsystem $node
 }
 
 # resolve any dm node to it's full path in /dev/mapper
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to