Add support for MOTD logo colors

- we might want to have different welcome colors for stable and nightly images
- this adds another branding option alongside with VENDOR, VENDORURL, VENDORSUPPORT, ...
This commit is contained in:
Igor Pecovnik
2025-03-28 12:02:13 +01:00
parent 49714857c6
commit 429e384137
2 changed files with 6 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ function do_main_configuration() {
unset VENDORSUPPORT,VENDORPRIVACY,VENDORBUGS,VENDORLOGO,ROOTPWD,MAINTAINER,MAINTAINERMAIL
fi
[[ -z $VENDORCOLOR ]] && VENDORCOLOR="247;16;0" # RGB values for MOTD logo
[[ -z $VENDORURL ]] && VENDORURL="https://duckduckgo.com/"
[[ -z $VENDORSUPPORT ]] && VENDORSUPPORT="https://community.armbian.com/"
[[ -z $VENDORPRIVACY ]] && VENDORPRIVACY="https://duckduckgo.com/"

View File

@@ -119,7 +119,11 @@ if systemctl is-active --quiet service hostapd && [[ -f /etc/hostapd/hostapd.con
fi
# Display software vendor logo
echo -e "\e[1;91m$(figlet -f small " ${VENDOR}")\e[0m"
if [[ -n "${VENDORCOLOR}" ]]; then
echo -e "\e[38;2;${VENDORCOLOR}m$(figlet -f small " ${VENDOR}")\e[0m"
else
echo -e "\e[1;91m$(figlet -f small " ${VENDOR}")\e[0m"
fi
# Read RPI model from cpuinfo
if [[ ${BOARD:-} == rpi4b ]]; then