dracut-gencmdline: fix LUKS_UUID and MD_UUID output
authorHarald Hoyer <harald@redhat.com>
Fri, 14 Aug 2009 07:44:03 +0000 (09:44 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 14 Aug 2009 14:21:03 +0000 (16:21 +0200)
dracut-gencmdline

index 269560a..733f199 100755 (executable)
@@ -643,6 +643,7 @@ emitcrypto()
     if [ -z "$luksuuid" ]; then
         luksuuid="$2"
     fi
+    luksuuid=${luksuuid##UUID=}
     echo -n "rd_LUKS_UUID=$luksuuid "
 }
 
@@ -652,7 +653,9 @@ done
 
 if [ -n "$raiddevices" ]; then
     for dev in $raiddevices; do
-        echo -n "rd_MD_UUID=${dev} "
+        uid=$(udevadm info --query=all --name=/dev/${dev}|grep  MD_UUID)
+        uid=$(IFS="=";set $uid;echo $2)
+        echo -n "rd_MD_UUID=$uid "
     done
 fi