From c6a36948c5884e6815bd0da75c9a498b47304160 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 29 Oct 2021 13:29:31 -0400 Subject: [PATCH] Whiptail: move BG_COLOR default definitions from gui-init to init - Set them only when FBWHIPTAIL is used. - If NEWT is used (console mode without framebuffer): set default to none. --- initrd/bin/gui-init | 2 -- initrd/init | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/initrd/bin/gui-init b/initrd/bin/gui-init index e5c6161d..44e283e7 100755 --- a/initrd/bin/gui-init +++ b/initrd/bin/gui-init @@ -3,8 +3,6 @@ BOARD_NAME=${CONFIG_BOARD_NAME:-${CONFIG_BOARD}} MAIN_MENU_TITLE="${BOARD_NAME} | Heads Boot Menu" -export BG_COLOR_WARNING="${CONFIG_WARNING_BG_COLOR:-"--background-gradient 0 0 0 150 125 0"}" -export BG_COLOR_ERROR="${CONFIG_ERROR_BG_COLOR:-"--background-gradient 0 0 0 150 0 0"}" export BG_COLOR_MAIN_MENU="" . /etc/functions diff --git a/initrd/init b/initrd/init index 858d9c39..85f84c26 100755 --- a/initrd/init +++ b/initrd/init @@ -43,6 +43,15 @@ hwclock -l -s . /etc/functions . /etc/config +#Specify whiptail background colors cues under FBWhiptail only +if [ "$CONFIG_FBWHIPTAIL" = "y" ]; then + export BG_COLOR_WARNING="${CONFIG_WARNING_BG_COLOR:-"--background-gradient 0 0 0 150 125 0"}" + export BG_COLOR_ERROR="${CONFIG_ERROR_BG_COLOR:-"--background-gradient 0 0 0 150 0 0"}" +elif [ "$CONFIG_NEWT" = "y" ];then + export BG_COLOR_WARNING="${CONFIG_WARNING_BG_COLOR:-""}" + export BG_COLOR_ERROR="${CONFIG_ERROR_BG_COLOR:-""}" +fi + if [ "$CONFIG_COREBOOT" = "y" ]; then /bin/cbfs-init fi