From 6b4f37f910a3a883967c5a93a87ad4f4590925f0 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 23 Nov 2023 14:33:14 +0100 Subject: add status report after decrypting disk and loop on wrong password --- elk.hook | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/elk.hook b/elk.hook index 9ed9375..14fcb0e 100644 --- a/elk.hook +++ b/elk.hook @@ -37,8 +37,12 @@ run_hook() { fi stty -echo - printf 'Enter Decryption Password: ' - read password + while (true); do + printf 'Enter Decryption Password: ' + read password + echo "$password" | cryptsetup open "/dev/disk/by-uuid/${elkuuid}" elkdev && break + printf "\r" + done + printf "\nUSB Key Decryption Successful \033[1m[\033[0m \033[32mOK\033[0m \033[1m]\033[0m\n" stty echo - printf "$password" | cryptsetup open "/dev/disk/by-uuid/${elkuuid}" elkdev } -- cgit v1.2.3-70-g09d2