diff --git a/dracut/dracut-crypt-fido2-lib.sh b/dracut/dracut-crypt-fido2-lib.sh index 6f19214..8323640 100644 --- a/dracut/dracut-crypt-fido2-lib.sh +++ b/dracut/dracut-crypt-fido2-lib.sh @@ -7,7 +7,8 @@ fido2_decrypt() { local keypath="$2" #Unused local keydev=$3 #Unused local device=$4 - export FIDO2LUKS_CREDENTIAL_ID="${keypath%.*}" + . /etc/$keypath + export FIDO2LUKS_CREDENTIAL_ID="${CREDENTIAL_ID:-$FIDO2LUKS_CREDENTIAL_ID}" export FIDO2LUKS_SALT="$(getargs rd.fido2luks.salt)" export FIDO2LUKS_PASSWORD_HELPER="/usr/bin/systemd-ask-password 'Disk 2fa password'" if [ -z "$FIDO2LUKS_SALT" ]; then diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index 5944e9d..a50cfea 100755 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -7,14 +7,11 @@ check() { } depends() { - echo rootfs-block - return 0 + echo crypt } install() { - patch - #inst_hook pre-trigger 91 "$moddir/ykluks.sh" #inst_hook initqueue 01 "$moddir/fido2luks.sh" #inst_hook pre-mount 1 "$moddir/fix_crypttab.sh"