mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
oem-factory-reset gui-init: fix whiptail_error segfaulting because selfcalling itself, fix typo in gui-init
fix bugs introduced by #1698 Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
3b22ae68e5
commit
3c76bdc510
@ -363,7 +363,7 @@ check_gpg_key()
|
|||||||
option=$(cat /tmp/whiptail)
|
option=$(cat /tmp/whiptail)
|
||||||
case "$option" in
|
case "$option" in
|
||||||
g )
|
g )
|
||||||
gpg-gui.sh && BG_COLOR_MAIN_MENU="normnal"
|
gpg-gui.sh && BG_COLOR_MAIN_MENU="normal"
|
||||||
;;
|
;;
|
||||||
i )
|
i )
|
||||||
skip_to_menu="true"
|
skip_to_menu="true"
|
||||||
|
@ -62,7 +62,7 @@ die() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail_error() {
|
local_whiptail_error() {
|
||||||
local msg=$1
|
local msg=$1
|
||||||
if [ "$msg" = "" ]; then
|
if [ "$msg" = "" ]; then
|
||||||
die "whiptail error: An error msg is required"
|
die "whiptail error: An error msg is required"
|
||||||
@ -71,7 +71,7 @@ whiptail_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
whiptail_error_die() {
|
whiptail_error_die() {
|
||||||
whiptail_error "$@"
|
local_whiptail_error "$@"
|
||||||
die
|
die
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1111,7 +1111,7 @@ if [ "$GPG_GEN_KEY_IN_MEMORY" = "n" -o "$GPG_GEN_KEY_IN_MEMORY_COPY_TO_SMARTCARD
|
|||||||
echo -e "\nChecking for USB Security Dongle...\n"
|
echo -e "\nChecking for USB Security Dongle...\n"
|
||||||
enable_usb
|
enable_usb
|
||||||
if ! gpg --card-status >/dev/null 2>&1; then
|
if ! gpg --card-status >/dev/null 2>&1; then
|
||||||
whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
|
local_whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
|
||||||
if ! gpg --card-status >/dev/null 2>/tmp/error; then
|
if ! gpg --card-status >/dev/null 2>/tmp/error; then
|
||||||
ERROR=$(tail -n 1 /tmp/error | fold -s)
|
ERROR=$(tail -n 1 /tmp/error | fold -s)
|
||||||
whiptail_error_die "Unable to detect USB Security Dongle:\n\n${ERROR}"
|
whiptail_error_die "Unable to detect USB Security Dongle:\n\n${ERROR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user