From 37a92f9dcab9e6445f83bb08531e2d31f9bd5ffd Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:43:47 -0500 Subject: [PATCH] fix: luks-enable-tpm2-autounlock (#342) * fix: luks-enable-tpm2-autounlock * Update luks-enable-tpm2-autounlock * 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 a083023a..2c034109 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 -A29 systemd-tpm2|grep Keyslot|awk '{print $2}') + KEYSLOT=$(cryptsetup luksDump "$CRYPT_DISK" | 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