aboutsummaryrefslogtreecommitdiff
path: root/elk.hook
diff options
context:
space:
mode:
Diffstat (limited to 'elk.hook')
-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
}