From: Alexander Tsoy Date: Thu, 1 Feb 2018 19:36:24 +0000 (+0300) Subject: crypt: actually put block_uuid.map into initramfs X-Git-Tag: 047~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=643be55570ab6f5b1a7c387123f8f409d44e6c76;p=thirdparty%2Fdracut.git crypt: actually put block_uuid.map into initramfs Also change path to /etc/block_uuid.map. Fixes: c3b6970394ad677f05a42bef420bf34b1d0652e0 --- diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh index 90b681e49..532b9a715 100755 --- a/modules.d/90crypt/crypt-lib.sh +++ b/modules.d/90crypt/crypt-lib.sh @@ -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 diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh index 69aceaab9..b7232e987 100755 --- a/modules.d/90crypt/module-setup.sh +++ b/modules.d/90crypt/module-setup.sh @@ -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}