Blame 0018-crypt-module-setup.sh-also-handle-UUID-while-filteri.patch

Harald Hoyer b215c1
From cdcb27a4fee4400581becec37e862c461332cb50 Mon Sep 17 00:00:00 2001
Harald Hoyer b215c1
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b215c1
Date: Wed, 10 Apr 2013 10:15:43 +0200
Harald Hoyer b215c1
Subject: [PATCH] crypt/module-setup.sh: also handle UUID= while filtering
Harald Hoyer b215c1
 crypttab
Harald Hoyer b215c1
Harald Hoyer b215c1
The crypttab filter for host-only did not handle UUID= entries.
Harald Hoyer b215c1
https://bugzilla.redhat.com/show_bug.cgi?id=919752
Harald Hoyer b215c1
---
Harald Hoyer b215c1
 modules.d/90crypt/module-setup.sh | 4 ++++
Harald Hoyer b215c1
 1 file changed, 4 insertions(+)
Harald Hoyer b215c1
Harald Hoyer b215c1
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
Harald Hoyer b215c1
index 3c9a1f1..639a77f 100755
Harald Hoyer b215c1
--- a/modules.d/90crypt/module-setup.sh
Harald Hoyer b215c1
+++ b/modules.d/90crypt/module-setup.sh
Harald Hoyer b215c1
@@ -62,6 +62,10 @@ install() {
Harald Hoyer b215c1
         while read _mapper _dev _rest; do
Harald Hoyer b215c1
             [[ $_mapper = \#* ]] && continue
Harald Hoyer b215c1
             [[ $_dev ]] || continue
Harald Hoyer b215c1
+
Harald Hoyer b215c1
+            [[ $_dev == UUID=* ]] && \
Harald Hoyer b215c1
+                _dev="/dev/disk/by-uuid/${_dev#UUID=}"
Harald Hoyer b215c1
+
Harald Hoyer b215c1
             for _hdev in "${!host_fs_types[@]}"; do
Harald Hoyer b215c1
                 [[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue
Harald Hoyer b215c1
                 if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then