]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt: actually put block_uuid.map into initramfs
authorAlexander Tsoy <alexander@tsoy.me>
Thu, 1 Feb 2018 19:36:24 +0000 (22:36 +0300)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 2 Feb 2018 10:40:29 +0000 (11:40 +0100)
Also change path to /etc/block_uuid.map.

Fixes: c3b6970394ad677f05a42bef420bf34b1d0652e0
modules.d/90crypt/crypt-lib.sh
modules.d/90crypt/module-setup.sh

index 90b681e4910fae125327183d060df686642b4d8e..532b9a715d0260915396d996eabded897a0831b1 100755 (executable)
@@ -16,13 +16,13 @@ crypttab_contains() {
                     [ "$dev" -ef "$_dev" ] && return 0
                 done
             fi
-            if [ -e /usr/lib/dracut/modules.d/90crypt/block_uuid.map ]; then
+            if [ -e /etc/block_uuid.map ]; then
                 # search for line starting with $d
-                _line=$(sed -n "\,^$d .*$,{p}" /usr/lib/dracut/modules.d/90crypt/block_uuid.map)
+                _line=$(sed -n "\,^$d .*$,{p}" /etc/block_uuid.map)
                 [ -z "$_line" ] && continue
                 # get second column with uuid
                 _uuid="$(echo $_line | sed 's,^.* \(.*$\),\1,')"
-               strstr "$_uuid" "${luks##luks-}" && return 0
+                strstr "$_uuid" "${luks##luks-}" && return 0
             fi
         done < /etc/crypttab
     fi
index 69aceaab98bdabdc777777c16b7be28e1ce47905..b7232e987ff9c80fd2b3cf0e21f24deb1967f77f 100755 (executable)
@@ -81,7 +81,7 @@ install() {
             [[ $_dev == ID=* ]] && \
                 _dev="/dev/disk/by-id/${_dev#ID=}"
 
-            echo "$_dev $(blkid $_dev -s UUID -o value)" >> /usr/lib/dracut/modules.d/90crypt/block_uuid.map
+            echo "$_dev $(blkid $_dev -s UUID -o value)" >> "${initdir}/etc/block_uuid.map"
 
             # loop through the options to check for the force option
             luksoptions=${_luksoptions}