add PARTLABEL and PARTUUID
authorHarald Hoyer <harald@redhat.com>
Fri, 5 Jul 2013 13:31:06 +0000 (15:31 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 5 Jul 2013 13:32:38 +0000 (15:32 +0200)
modules.d/01fips/fips.sh
modules.d/90dmsquash-live/parse-dmsquash-live.sh
modules.d/95resume/parse-resume.sh
modules.d/95rootfs-block/parse-block.sh
modules.d/98systemd/dracut-cmdline.sh
modules.d/99base/dracut-lib.sh

index 2ec2152..f3cab31 100755 (executable)
@@ -15,6 +15,12 @@ mount_boot()
         UUID=*)
             boot="/dev/disk/by-uuid/${boot#UUID=}"
             ;;
+        PARTUUID=*)
+            boot="/dev/disk/by-partuuid/${boot#PARTUUID=}"
+            ;;
+        PARTLABEL=*)
+            boot="/dev/disk/by-partlabel/${boot#PARTLABEL=}"
+            ;;
         /dev/*)
             ;;
         *)
index 3e9a347..a5564e2 100755 (executable)
@@ -34,6 +34,14 @@ case "$liveroot" in
         root="${root#live:}"
         root="live:/dev/disk/by-uuid/${root#UUID=}"
         rootok=1 ;;
+    live:PARTUUID=*|PARTUUID=*) \
+        root="${root#live:}"
+        root="live:/dev/disk/by-partuuid/${root#PARTUUID=}"
+        rootok=1 ;;
+    live:PARTLABEL=*|PARTLABEL=*) \
+        root="${root#live:}"
+        root="live:/dev/disk/by-partlabel/${root#PARTLABEL=}"
+        rootok=1 ;;
     live:/*.[Ii][Ss][Oo]|/*.[Ii][Ss][Oo])
         root="${root#live:}"
         root="liveiso:${root}"
index 20ece99..bd4bcd3 100755 (executable)
@@ -17,6 +17,8 @@ case "$resume" in
         resume="/dev/disk/by-uuid/${resume#UUID=}" ;;
     PARTUUID=*) \
         resume="/dev/disk/by-partuuid/${resume#PARTUUID=}" ;;
+    PARTLABEL=*) \
+        resume="/dev/disk/by-partlabel/${resume#PARTLABEL=}" ;;
 esac
 
 if splash=$(getarg splash=); then
index 24fbccb..0a23ac7 100755 (executable)
@@ -16,6 +16,10 @@ case "$root" in
         root="${root#block:}"
         root="block:/dev/disk/by-partuuid/${root#PARTUUID=}"
         rootok=1 ;;
+    block:PARTLABEL=*|PARTLABEL=*)
+        root="${root#block:}"
+        root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}"
+        rootok=1 ;;
     /dev/*)
         root="block:${root}"
         rootok=1 ;;
index a6738bd..50b8d6c 100755 (executable)
@@ -57,6 +57,10 @@ case "$root" in
         root="${root#block:}"
         root="block:/dev/disk/by-partuuid/${root#PARTUUID=}"
         rootok=1 ;;
+    block:PARTLABEL=*|PARTLABEL=*)
+        root="${root#block:}"
+        root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}"
+        rootok=1 ;;
     /dev/*)
         root="block:${root}"
         rootok=1 ;;
index 1a2cc11..089d336 100755 (executable)
@@ -572,12 +572,15 @@ nfsroot_to_var() {
 # TOOD: symlinks
 udevmatch() {
     case "$1" in
-    UUID=????????-????-????-????-????????????|LABEL=*)
+    UUID=????????-????-????-????-????????????|LABEL=*|PARTLABEL=*|PARTUUID=????????-????-????-????-????????????)
         printf 'ENV{ID_FS_%s}=="%s"' "${1%%=*}" "${1#*=}"
         ;;
     UUID=*)
         printf 'ENV{ID_FS_UUID}=="%s*"' "${1#*=}"
         ;;
+    PARTUUID=*)
+        printf 'ENV{ID_FS_PARTUUID}=="%s*"' "${1#*=}"
+        ;;
     /dev/?*) printf -- 'KERNEL=="%s"' "${1#/dev/}" ;;
     *) return 255 ;;
     esac