diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2024-04-18 11:29:40 +0100 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2024-04-18 11:29:40 +0100 |
| commit | 165e9602376b1ee25d8599389e5ae5643dd9754c (patch) | |
| tree | 99e436b3576dcf0a85fb6d6a86606c0c59cfe0d9 | |
| parent | c70f96f1464497bd03108385ed1e40fbf39aba94 (diff) | |
Fix keyboard configuration
keyboard-configuration scripts ignores debconf settings if it doesn't
detect an attached keyboard. Instead, it sets XKBOPTIONS to
lv3:ralt_switch, which is not a desired option. It also considers an
empty XKBOPTIONS string to be unset. This workaround sets it to a
placeholder value which is removed later. dpkg-reconfigure is run
so that debconf-get-selections prints the correct values.
| -rw-r--r-- | stage2/01-sys-tweaks/00-debconf | 2 | ||||
| -rwxr-xr-x | stage2/01-sys-tweaks/01-run.sh | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/stage2/01-sys-tweaks/00-debconf b/stage2/01-sys-tweaks/00-debconf index c13e3b1..884db93 100644 --- a/stage2/01-sys-tweaks/00-debconf +++ b/stage2/01-sys-tweaks/00-debconf @@ -24,3 +24,5 @@ keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true # Keyboard layout: # Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other keyboard-configuration keyboard-configuration/variant select ${KEYBOARD_LAYOUT} +# for internal use +keyboard-configuration keyboard-configuration/optionscode string PLACEHOLDER diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 59988b2..897463e 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -67,3 +67,8 @@ usermod --pass='*' root EOF rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* + +sed -i "s/PLACEHOLDER//" "${ROOTFS_DIR}/etc/default/keyboard" +on_chroot << EOF +DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration +EOF |
