V8.00.000.2025.06.17

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-15 10:59:22 +02:00
parent b459ed8a90
commit e38e676717
7 changed files with 436 additions and 422 deletions

View File

@@ -31,31 +31,22 @@ setup_locales() {
### Give priority to '${locale_locale}' over separately configured variables '{$locale_country}' and '{$locale_language}'.
### If 'locale_locale' is not set, build it from 'locale_language' and 'locale_country'.
if [[ -n "${locale_language:-}" && -n "${locale_country:-}" && -z "${locale_locale}" ]]; then
locale_locale="${locale_language}_${locale_country}.UTF-8"
if [[ -n "${locale_language:-}" && -n "${locale_country:-}" && -z "${locale_locale:-}" ]]; then
declare locale_locale="${locale_language}_${locale_country}.UTF-8"
fi
if [[ -n "${locale_locale}" ]]; then
### Generate the specified locale
do_in_target "${TARGET}" locale-gen "${locale_locale}"
### Generate the specified locale
do_in_target "${TARGET}" locale-gen "${locale_locale}"
do_log "info" "true" "Command: 'locale-gen ${locale_locale}' executed in: '${TARGET}'."
### Set the standard locale
do_in_target "${TARGET}" update-locale LANG="${locale_locale}" LC_ALL="${locale_locale}"
### Set the standard locale
do_in_target "${TARGET}" update-locale LANG="${locale_locale}" LC_ALL="${locale_locale}"
do_log "info" "true" "Command: 'update-locale LANG=${locale_locale} LC_ALL=${locale_locale}' executed in: '${TARGET}'."
### Set the keyboard layout for the system (for consoles)
sed -i "s/^KEYMAP=.*/KEYMAP=${locale_keyboard_layout}/" "${TARGET}/etc/default/keyboard"
do_log "info" "false" "Keyboard layout updated: 'KEYMAP=${locale_keyboard_layout}' -> '${TARGET}/etc/default/keyboard'."
### Set the keyboard layout for the system (for consoles)
# shellcheck disable=SC2154 # "${locale_keyboard_layout}"
sed -i "s/^KEYMAP=.*/KEYMAP=${locale_keyboard_layout}/" "${TARGET}"/etc/default/keyboard
do_log "info" "false" "Keyboard layout updated: 'KEYMAP=${locale_keyboard_layout}' -> '${TARGET}/etc/default/keyboard'."
### Set the X11 keyboard layout (for graphical environments)
# shellcheck disable=SC2154 # "${locale_keyboard_xkb_keymap}"
do_in_target "${TARGET}" localectl set-x11-keymap "${locale_keyboard_xkb_keymap}"
do_log "info" "true" "Command: 'localectl set-x11-keymap ${locale_keyboard_xkb_keymap}' executed in: '${TARGET}'."
fi
### Set the X11 keyboard layout (for graphical environments)
do_in_target "${TARGET}" localectl set-x11-keymap "${locale_keyboard_xkb_keymap}"
return 0
}