Files
fluffy-pancake/build/23-plymouth.sh
T

57 lines
2.2 KiB
Bash
Raw Normal View History

#!/usr/bin/bash
set -eoux pipefail
###############################################################################
# Transaction: Plymouth Bootsplash (Text-Theme "fluffy-pancake")
###############################################################################
# - Eigenes Theme aus build/plymouth-theme/ installieren, als Default setzen.
# - Initramfs neu bauen (Plymouth-Modul muss rein, sonst kein Early-Splash).
# no-hostonly = laeuft auf jeder Hardware (VM + Laptop).
# Kernel aus dem IMAGE (/usr/lib/modules), NICHT uname -r (Host-Kernel!).
###############################################################################
echo "Installing Plymouth splash (fluffy-pancake)..."
dnf5 install -y \
--allowerasing \
plymouth \
2026-09-28 07:04:47 +02:00
plymouth-system-theme \
2026-10-03 13:44:38 +02:00
plymouth-plugin-script \
fedora-logos
mkdir -p /usr/share/plymouth/themes/fluffy
cp /tmp/plymouth-theme/fluffy.plymouth /tmp/plymouth-theme/fluffy.script \
/usr/share/plymouth/themes/fluffy/
2026-10-03 13:44:38 +02:00
# Logo aus dem signierten Paket (kein Download, kein Artwork im Repo).
# Fail-fast: ohne Logo kein Splash mit Bild.
LOGO=""
for candidate in /usr/share/pixmaps/fedora-logo.png; do
if [[ -f "${candidate}" ]]; then
LOGO="${candidate}"
break
fi
done
if [[ -z "${LOGO}" ]]; then
echo "FEHLER: kein Fedora-Logo in fedora-logos gefunden"
exit 1
fi
cp "${LOGO}" /usr/share/plymouth/themes/fluffy/logo.png
echo "Splash-Logo: ${LOGO}"
plymouth-set-default-theme fluffy
# HOME auf /tmp setzen: dracut versucht sonst in Container-Builds /root in
# die Initramfs zu stagen (scheitert mit "installing '/root'") - harmlos,
# aber vermeidbar. Initramfs wird trotzdem erzeugt.
for kdir in /usr/lib/modules/*; do
kver="$(basename "${kdir}")"
HOME=/tmp dracut --force --no-hostonly --kver "${kver}" "${kdir}/initramfs.img"
# Fail-fast: dracut kann trotz Fehler (z.B. fehlende Module) mit 0
# enden. Eine leere/fehlende Initramfs wuerde einen nicht bootenden
# Kernel hinterlassen - das hier faengt das ab.
[[ -s "${kdir}/initramfs.img" ]] || { echo "FEHLER: Initramfs fuer ${kver} fehlt/leer"; exit 1; }
done
# plymouth-start.service ist statisch (kein [Install]-Abschnitt) und wird
# ueber Initramfs/Kernel ausgeloest - ein `systemctl enable` ist hier
# falsch und erzeugt nur eine Warnung. Bewusst entfernt.
dnf5 clean all