Skip to content

Commit b226453

Browse files
authored
Merge pull request #1778 from tlaurion/fix_whiptail_color_output_remnants_bug
oem-factory-reset gui-init: fix whiptail_error segfaulting because selfcalling itself; fix typo in gui-init
2 parents 3b22ae6 + 3c76bdc commit b226453

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

initrd/bin/gui-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ check_gpg_key()
363363
option=$(cat /tmp/whiptail)
364364
case "$option" in
365365
g )
366-
gpg-gui.sh && BG_COLOR_MAIN_MENU="normnal"
366+
gpg-gui.sh && BG_COLOR_MAIN_MENU="normal"
367367
;;
368368
i )
369369
skip_to_menu="true"

initrd/bin/oem-factory-reset

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ die() {
6262
exit 1
6363
}
6464

65-
whiptail_error() {
65+
local_whiptail_error() {
6666
local msg=$1
6767
if [ "$msg" = "" ]; then
6868
die "whiptail error: An error msg is required"
@@ -71,7 +71,7 @@ whiptail_error() {
7171
}
7272

7373
whiptail_error_die() {
74-
whiptail_error "$@"
74+
local_whiptail_error "$@"
7575
die
7676
}
7777

@@ -1111,7 +1111,7 @@ if [ "$GPG_GEN_KEY_IN_MEMORY" = "n" -o "$GPG_GEN_KEY_IN_MEMORY_COPY_TO_SMARTCARD
11111111
echo -e "\nChecking for USB Security Dongle...\n"
11121112
enable_usb
11131113
if ! gpg --card-status >/dev/null 2>&1; then
1114-
whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
1114+
local_whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
11151115
if ! gpg --card-status >/dev/null 2>/tmp/error; then
11161116
ERROR=$(tail -n 1 /tmp/error | fold -s)
11171117
whiptail_error_die "Unable to detect USB Security Dongle:\n\n${ERROR}"

0 commit comments

Comments
 (0)