Compare commits

...

2 Commits

Author SHA1 Message Date
coderabbitai[bot]
2529a8662e 📝 Add docstrings to rgblogo
Docstrings generation was requested by @igorpecovnik.

* https://github.com/armbian/build/pull/8018#issuecomment-2761030989

The following files were modified:

* `lib/functions/configuration/main-config.sh`
2025-03-28 11:36:20 +00:00
Igor Pecovnik
429e384137 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, ...
2025-03-28 12:27:06 +01:00
2 changed files with 39 additions and 2 deletions

View File

@@ -7,7 +7,39 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
### Attention: we can't use any interactive programs, read from stdin, nor use non-coreutils utilities here.
# Initializes the main build configuration for generating Armbian images.
#
# This function sets up core environment variables, applies defaults for branding,
# network configuration, filesystem support, timezone settings, and build options.
# It determines the build revision from user or main version files, validates critical
# settings (e.g., ensuring the revision starts with a digit and that mandatory
# encryption parameters are defined when needed), and marks key variables as read-only.
# The function also invokes extension hooks for family- and branch-specific configuration.
#
# Globals:
# MOUNT_UUID - Identifier used in alert messages.
# REVISION - Build revision derived from version files; made read-only.
# VENDOR - Build image vendor, defaulting to "Armbian-unofficial" if unset.
# VENDORURL, VENDORSUPPORT, VENDORPRIVACY, VENDORBUGS, VENDORLOGO
# - Settings for image branding and support links.
# ROOTPWD, MAINTAINER, MAINTAINERMAIL
# - Default credentials and maintainer details.
# DEST_LANG - Target locale for the image, defaulting to "en_US.UTF-8".
# SKIP_EXTERNAL_TOOLCHAINS, USE_CCACHE
# - Build toolchain and caching options.
# NETWORKING_STACK - Selected networking configuration, inferred based on BUILD_MINIMAL.
# TZDATA - Timezone info taken from /etc/timezone or defaulted to "Etc/UTC".
# CHROOT_CACHE_VERSION - Version for chroot cache management.
# DEB_COMPRESS - Compression method for .deb packages, adjusted for CI environments.
#
# Outputs:
# Displays progress and debug alerts to STDOUT/STDERR and exits on configuration errors.
#
# Returns:
# None. Exits the script if critical configuration validations fail.
#
# Example:
# do_main_configuration
function do_main_configuration() {
display_alert "Starting main configuration" "${MOUNT_UUID}" "info"
@@ -47,6 +79,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