Skip to content

Commit

Permalink
fix: luks-enable-tpm2-autounlock (#342)
Browse files Browse the repository at this point in the history
* fix: luks-enable-tpm2-autounlock

* Update luks-enable-tpm2-autounlock

* Update luks-enable-tpm2-autounlock
  • Loading branch information
m2Giles authored Nov 17, 2024
1 parent 74905f5 commit 37a92f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/ublue-os-luks/luks-enable-tpm2-autounlock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37a92f9

Please sign in to comment.