]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt/module-setup.sh: also handle UUID= while filtering crypttab
authorHarald Hoyer <harald@redhat.com>
Wed, 10 Apr 2013 08:15:43 +0000 (10:15 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 10 Apr 2013 08:16:49 +0000 (10:16 +0200)
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

index 3c9a1f19a0d78640e7fada95b5c9f7291ca650c3..639a77fc5fe7dc1da92ee62e53fffc2b5626d69f 100755 (executable)
@@ -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