aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-11-23 14:33:14 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2023-11-23 14:33:14 +0100
commit6b4f37f910a3a883967c5a93a87ad4f4590925f0 (patch)
tree4fd60edd672805d6d1f89495dc188a157a2d996d
parentcd890066f9677d0af4ba3f722e0f1c06751adccc (diff)
add status report after decrypting disk and loop on wrong passwordHEADmaster
-rw-r--r--elk.hook10
1 files 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
}