V8.13.132.2025.10.11
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m47s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m47s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -13,17 +13,6 @@ set -Ceuo pipefail
|
||||
|
||||
printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 '%s' starting ... \e[0m\n" "${0}"
|
||||
|
||||
#######################################
|
||||
# Simple error terminal logger.
|
||||
# Arguments:
|
||||
# None
|
||||
#######################################
|
||||
log(){ printf '[kbd-fix] %s\n' "$*" >&2; }
|
||||
|
||||
log "Ensuring required packages…"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -y --no-install-recommends keyboard-configuration console-setup xkb-data
|
||||
|
||||
#######################################
|
||||
# Get all NIC drivers of the current Host machine.
|
||||
# Globals:
|
||||
@@ -365,47 +354,6 @@ EOF
|
||||
|
||||
chmod 0755 /etc/initramfs-tools/hooks/ciss_debian_live_builder
|
||||
|
||||
log "Writing /etc/default/keyboard"
|
||||
rm -f /etc/default/keyboard
|
||||
cat << 'EOF' >| /etc/default/keyboard
|
||||
XKBMODEL="pc105"
|
||||
XKBLAYOUT="de"
|
||||
XKBVARIANT=""
|
||||
XKBOPTIONS=""
|
||||
BACKSPACE="guess"
|
||||
EOF
|
||||
|
||||
### Remove remaps & stale caches.
|
||||
rm -f /etc/console-setup/remap.inc /etc/console-setup/*remap* 2>/dev/null || true
|
||||
rm -f /etc/console-setup/cached*.kmap.gz 2>/dev/null || true
|
||||
|
||||
### Rebuild the cached console keymap (cache used at boot, avoids runtime warnings).
|
||||
LANG=C.UTF-8 setupcon --save-only --force --keyboard-only || true
|
||||
|
||||
### Validate (do not fail to build on known harmless 'Unknown X keysym' warnings).
|
||||
err="$(mktemp)"
|
||||
if ! LANG=C.UTF-8 ckbcomp -model pc105 -layout de -variant '' -option '' >/dev/null 2>|"${err}"; then
|
||||
|
||||
printf '[kbd-fix] ERROR: ckbcomp failed hard:\n' >&2
|
||||
sed -n '1,200p' "${err}" >&2
|
||||
exit 127
|
||||
|
||||
fi
|
||||
|
||||
if grep -q 'Unknown X keysym "dead_belowmacron"' "${err}"; then
|
||||
|
||||
printf '[kbd-fix] WARN: ignoring xkb warning: Unknown X keysym "dead_belowmacron"\n' >&2
|
||||
|
||||
fi
|
||||
rm -f "${err}"
|
||||
|
||||
# Ensure keyboard-setup runs late enough on live systems
|
||||
install -d /etc/systemd/system/keyboard-setup.service.d
|
||||
cat > /etc/systemd/system/keyboard-setup.service.d/10-after-localfs.conf <<'EOF'
|
||||
[Unit]
|
||||
After=local-fs.target
|
||||
EOF
|
||||
|
||||
### Regenerate the initramfs for the live system kernel
|
||||
update-initramfs -u -k all -v
|
||||
|
||||
|
||||
Reference in New Issue
Block a user