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.
This commit is contained in:
Thierry Laurion 2021-10-29 13:29:31 -04:00 committed by tlaurion
parent 28c7202bd8
commit c6a36948c5
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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