V8.13.132.2025.10.11
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m40s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m40s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -60,7 +60,7 @@ apt-get install -y intel-microcode amd64-microcode
|
||||
declare nic_driver="$(grep_nic_driver_modules)"
|
||||
cat << EOF >| /etc/initramfs-tools/modules
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -180,7 +180,7 @@ EOF
|
||||
|
||||
cat << 'EOF' >| /etc/initramfs-tools/update-initramfs.conf
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -215,7 +215,7 @@ EOF
|
||||
|
||||
cat << 'EOF' >| /etc/initramfs-tools/initramfs.conf
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -320,7 +320,7 @@ EOF
|
||||
cat << 'EOF' >> /etc/initramfs-tools/hooks/ciss_debian_live_builder
|
||||
#!/bin/sh
|
||||
# SPDX-Version: 3.0
|
||||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-CreationInfo: 2025-10-11; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||||
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||||
@@ -363,7 +363,7 @@ 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
|
||||
apt-get install -y --no-install-recommends keyboard-configuration console-setup xkb-data pciutils xkbcomp
|
||||
|
||||
log "Writing /etc/default/keyboard"
|
||||
rm -f /etc/default/keyboard
|
||||
@@ -375,44 +375,37 @@ XKBOPTIONS=""
|
||||
BACKSPACE="guess"
|
||||
EOF
|
||||
|
||||
log "Removing remap fragments (if any)"
|
||||
### Remove remaps & stale caches.
|
||||
rm -f /etc/console-setup/remap.inc /etc/console-setup/*remap* 2>/dev/null || true
|
||||
|
||||
log "Purging cached console keymaps"
|
||||
rm -f /etc/console-setup/cached*.kmap.gz 2>/dev/null || true
|
||||
|
||||
log "Rebuilding cached console keymap"
|
||||
setupcon --save-only --force --keyboard-only
|
||||
### Rebuild the cached console keymap (cache used at boot, avoids runtime warnings).
|
||||
LANG=C.UTF-8 setupcon --save-only --force --keyboard-only || true
|
||||
|
||||
log "Validating via ckbcomp"
|
||||
### Validate (do not fail to build on known harmless 'Unknown X keysym' warnings).
|
||||
err="$(mktemp)"
|
||||
if ! ckbcomp -model pc105 -layout de -variant '' -option '' >/dev/null 2>"${err}"; then
|
||||
if ! LANG=C.UTF-8 ckbcomp -model pc105 -layout de -variant '' -option '' >/dev/null 2>|"${err}"; then
|
||||
|
||||
log "ERROR: ckbcomp failed:"
|
||||
printf '[kbd-fix] ERROR: ckbcomp failed hard:\n' >&2
|
||||
sed -n '1,200p' "${err}" >&2
|
||||
exit 127
|
||||
|
||||
fi
|
||||
|
||||
if grep -q 'Unknown X keysym' "${err}"; then
|
||||
if grep -q 'Unknown X keysym "dead_belowmacron"' "${err}"; then
|
||||
|
||||
log "ERROR: Unknown X keysyms remain; check custom remaps or xkb-data version:"
|
||||
sed -n '1,200p' "${err}" >&2
|
||||
exit 128
|
||||
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
|
||||
rm -f /etc/systemd/system/keyboard-setup.service.d/10-after-localfs.conf
|
||||
cat << 'EOF' >| /etc/systemd/system/keyboard-setup.service.d/10-after-localfs.conf
|
||||
cat > /etc/systemd/system/keyboard-setup.service.d/10-after-localfs.conf <<'EOF'
|
||||
[Unit]
|
||||
After=local-fs.target
|
||||
EOF
|
||||
|
||||
log "Done. Remaps & caches cleaned; cached.kmap.gz regenerated; validation passed."
|
||||
|
||||
### Regenerate the initramfs for the live system kernel
|
||||
update-initramfs -u -k all -v
|
||||
|
||||
|
||||
Reference in New Issue
Block a user