From f6a540d36cb6e32f70595ef9d3f8da557b6dea0e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 5 Jun 2025 19:47:42 +0100 Subject: [PATCH] Simplify console-setup configuration --- stage2/01-sys-tweaks/00-debconf | 6 ------ stage2/01-sys-tweaks/01-run.sh | 5 ++--- stage2/01-sys-tweaks/files/console-setup | 16 ---------------- 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 stage2/01-sys-tweaks/files/console-setup diff --git a/stage2/01-sys-tweaks/00-debconf b/stage2/01-sys-tweaks/00-debconf index 884db93..5e3340b 100644 --- a/stage2/01-sys-tweaks/00-debconf +++ b/stage2/01-sys-tweaks/00-debconf @@ -1,12 +1,6 @@ -# Encoding to use on the console: -# Choices: ARMSCII-8, CP1251, CP1255, CP1256, GEORGIAN-ACADEMY, GEORGIAN-PS, IBM1133, ISIRI-3342, ISO-8859-1, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, KOI8-R, KOI8-U, TIS-620, UTF-8, VISCII -console-setup console-setup/charmap47 select UTF-8 # Character set to support: # Choices: . Arabic, # Armenian, # Cyrillic - KOI8-R and KOI8-U, # Cyrillic - non-Slavic languages, # Cyrillic - Slavic languages (also Bosnian and Serbian Latin), . Ethiopic, # Georgian, # Greek, # Hebrew, # Lao, # Latin1 and Latin5 - western Europe and Turkic languages, # Latin2 - central Europe and Romanian, # Latin3 and Latin8 - Chichewa; Esperanto; Irish; Maltese and Welsh, # Latin7 - Lithuanian; Latvian; Maori and Marshallese, . Latin - Vietnamese, # Thai, . Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic, . Combined - Latin; Slavic Cyrillic; Greek, . Combined - Latin; Slavic and non-Slavic Cyrillic, Guess optimal character set console-setup console-setup/codeset47 select Guess optimal character set -# Font for the console: -# Choices: Fixed, Goha, GohaClassic, Terminus, TerminusBold, TerminusBoldVGA, VGA, Do not change the boot/kernel font, Let the system select a suitable font -console-setup console-setup/fontface47 select Do not change the boot/kernel font # Key to function as AltGr: # Choices: The default for the keyboard layout, No AltGr key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Alt, Left Logo key, Keypad Enter key, Both Logo keys, Both Alt keys keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index aca8074..9488996 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -4,8 +4,6 @@ install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" -install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/" - if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys @@ -66,9 +64,10 @@ EOF rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* +sed -i 's/^FONTFACE=.*/FONTFACE=""/;s/^FONTSIZE=.*/FONTSIZE=""/' "${ROOTFS_DIR}/etc/default/console-setup" sed -i "s/PLACEHOLDER//" "${ROOTFS_DIR}/etc/default/keyboard" on_chroot << EOF -DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration +DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration console-setup EOF sed -i 's/^#\?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf" diff --git a/stage2/01-sys-tweaks/files/console-setup b/stage2/01-sys-tweaks/files/console-setup deleted file mode 100644 index 6508cdc..0000000 --- a/stage2/01-sys-tweaks/files/console-setup +++ /dev/null @@ -1,16 +0,0 @@ -# CONFIGURATION FILE FOR SETUPCON - -# Consult the console-setup(5) manual page. - -ACTIVE_CONSOLES="/dev/tty[1-6]" - -CHARMAP="UTF-8" - -CODESET="guess" -FONTFACE="" -FONTSIZE="" - -VIDEOMODE= - -# The following is an example how to use a braille font -# FONT='lat9w-08.psf.gz brl-8x8.psf'