summaryrefslogtreecommitdiffstats
path: root/0018-crypt-module-setup.sh-also-handle-UUID-while-filteri.patch
blob: 0fd2982e4564a8e40659005fd99ebac14db258bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From cdcb27a4fee4400581becec37e862c461332cb50 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 10 Apr 2013 10:15:43 +0200
Subject: [PATCH] crypt/module-setup.sh: also handle UUID= while filtering
 crypttab

The crypttab filter for host-only did not handle UUID= entries.
https://bugzilla.redhat.com/show_bug.cgi?id=919752
---
 modules.d/90crypt/module-setup.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index 3c9a1f1..639a77f 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -62,6 +62,10 @@ install() {
         while read _mapper _dev _rest; do
             [[ $_mapper = \#* ]] && continue
             [[ $_dev ]] || continue
+
+            [[ $_dev == UUID=* ]] && \
+                _dev="/dev/disk/by-uuid/${_dev#UUID=}"
+
             for _hdev in "${!host_fs_types[@]}"; do
                 [[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue
                 if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then