From 7300165c80b6a0aa5eb2a56c811d135732674b93 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:53:54 -0500 Subject: [PATCH] Update luks-enable-tpm2-autounlock --- build/ublue-os-luks/luks-enable-tpm2-autounlock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ublue-os-luks/luks-enable-tpm2-autounlock b/build/ublue-os-luks/luks-enable-tpm2-autounlock index cf7eabb1..b883f852 100755 --- a/build/ublue-os-luks/luks-enable-tpm2-autounlock +++ b/build/ublue-os-luks/luks-enable-tpm2-autounlock @@ -66,7 +66,7 @@ if [[ ! -L "$CRYPT_DISK" ]]; then fi if cryptsetup luksDump "$CRYPT_DISK" | grep systemd-tpm2 > /dev/null; then - KEYSLOT=$(cryptsetup luksDump "$CRYPT_DISK"|grep -A30 systemd-tpm2|grep Keyslot|awk '{print $2}') + KEYSLOT=$(cryptsetup luksDump /dev/disk/by-uuid/668391d5-617c-46e1-94f9-99be758d5d03 | sed -n '/systemd-tpm2$/,/Keyslot:/p' | grep Keyslot|awk '{print $2}') echo "TPM2 already present in LUKS keyslot $KEYSLOT of $CRYPT_DISK." read -p "Wipe it and re-enroll? (y/N): " -n 1 -r echo