From: Plom Heller Date: Wed, 2 Sep 2026 19:40:24 +0000 (+0200) Subject: Declare (most basic) locale. X-Git-Url: https://plomlompom.com/repos/booking/%22https:/validator.w3.org/bar%20baz.html?a=commitdiff_plain;h=49e6b6f8ff26d2bd9ae24cd91438daeee04f6466;p=confplom Declare (most basic) locale. --- diff --git a/start_root.sh b/start_root.sh index ceea52f..ecd4d11 100755 --- a/start_root.sh +++ b/start_root.sh @@ -4,10 +4,12 @@ cd "$(dirname "$0")" || exit # constants unlikely to change FNAME_START_HOME=start_home.sh +PATH_DEFAULT_LOCALE=/etc/default/locale PATH_SYSCTL_PRINTK=/etc/sysctl.d/60-printk-console.conf PATH_TLP_THRESH_CONF=/etc/tlp.conf.d/60-thresholds.conf # constants we might want to change at some point +LOCALE=C.UTF-8 TO_INSTALL="man-db ntpsec-ntpdate sudo sway tlp vim" USERNAME=plom PRINTK_LEVELS="4 4 1 7" @@ -21,6 +23,12 @@ msg 'Ensuring packages: %s' "${TO_INSTALL}" apt-get -y update apt-get -y install ${TO_INSTALL} +# C.UTF-8 is built into glibc itself (unlike e.g. en_US.UTF-8), so no +# "locales" package / locale-gen is needed to make it available — writing +# it here is enough for it to apply system-wide from the next login on. +msg 'Setting system locale to %s …' "${LOCALE}" +printf 'LANG=%s\n' "${LOCALE}" >| "${PATH_DEFAULT_LOCALE}" + msg 'Quieting routine kernel messages on the console …' printf 'kernel.printk = %s\n' "${PRINTK_LEVELS}" >| "${PATH_SYSCTL_PRINTK}" sysctl -p "${PATH_SYSCTL_PRINTK}"