gpg_auth function was not failing properly on failing, die instead

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Thierry Laurion 2023-10-26 16:52:38 -04:00
parent 05fc4c1747
commit 7f5d9700b7
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -189,8 +189,12 @@ gpg_auth() {
return 0 return 0
else else
shred -n 10 -z -u "$CR_SIG" 2>/dev/null || true shred -n 10 -z -u "$CR_SIG" 2>/dev/null || true
echo >&2 "!!!!! GPG authentication failed, please try again !!!!!" if [ "$tries" -lt 3 ]; then
continue echo >&2 "!!!!! GPG authentication failed, please try again !!!!!"
continue
else
die "GPG authentication failed, please reboot and try again"
fi
fi fi
done done
return 1 return 1
@ -214,6 +218,7 @@ recovery() {
. /tmp/config . /tmp/config
if [ "$CONFIG_TPM" = "y" ]; then if [ "$CONFIG_TPM" = "y" ]; then
echo " !!!!! Extending TPM PCR 4 for recovery shell access !!!!!"
tpmr extend -ix 4 -ic recovery tpmr extend -ix 4 -ic recovery
fi fi