From dc8eb78bc49d7eb7a95299219e9d01066dd758c9 Mon Sep 17 00:00:00 2001 From: Krishbin Paudel <55192001+krishbin@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:25:48 +0545 Subject: [PATCH] fix: fixed initial prompt in luks-enable-tpm2-autounlock I had mistakenly removed the initial scripts that came in when refactored on the commit 6ff6bef619178edb9bc0cc82f436bfc4e0371494 --- build/ublue-os-luks/luks-enable-tpm2-autounlock | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/ublue-os-luks/luks-enable-tpm2-autounlock b/build/ublue-os-luks/luks-enable-tpm2-autounlock index f22d991..1b08cae 100755 --- a/build/ublue-os-luks/luks-enable-tpm2-autounlock +++ b/build/ublue-os-luks/luks-enable-tpm2-autounlock @@ -1,11 +1,15 @@ #!/bin/bash ## enable auto-unlock LUKS2 encrypted root on Fedora/Silverblue/maybe others -set -euo pipefail +set -eou pipefail [ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1;} -echo "This script utilizes systemd-cryptenroll to enable tpm2 auto-unlock." +echo "This script uses systemd-cryptenroll to enable TPM2 auto-unlock." echo "You can review systemd-cryptenroll's manpage for more information." +echo "This script will modify your system." +echo "It will enable TPM2 auto-unlock of your LUKS partition for your root device!" +echo "It will bind to PCR 7 only which is tied to your secureboot state." +read -p "Are you sure are good with this and want to enable TPM2 auto-unlock? " -n 1 -r read -p "This will modify your system and enable TPM2 auto-unlock of your LUKS partition! Are you sure you are good with this? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then