wrolpi/debian-live-config/config/hooks/normal/9999-rebrand-bootmenu.binary

48 lines
1.7 KiB
Text
Raw Normal View History

2026-05-24 19:01:59 -06:00
#!/bin/sh
# Rebrand the live-build generated boot menus.
#
# live-build invokes binary hooks with cwd = the build's binary/ directory
# (it does `cd binary && ../hook`), so paths here are relative to binary/.
#
2026-05-24 19:01:59 -06:00
# live-build templates substitute @LINUX_LIVE@ etc. with text like
# "Live system (amd64)" (see /usr/lib/live/build/binary_grub_cfg) and
# similar strings into ISOLINUX live.cfg. We can't override the
# substitution source without patching live-build itself; instead this
# hook runs after the binary stage generated the files and seds the
# strings in place.
2026-05-24 19:01:59 -06:00
#
# splash.png on the GRUB / ISOLINUX menus is replaced via
# config/includes.binary/{boot/grub,isolinux}/splash.png — those land
# automatically and overwrite the auto-generated Debian splash (which
# contained the yellow hardhat and a "Debian GNU/Linux 12 (bookworm)
# amd64" line).
2026-05-24 19:01:59 -06:00
set -e
# GRUB (UEFI + grub-pc)
for f in boot/grub/grub.cfg \
boot/grub/install_start.cfg \
boot/grub/install.cfg; do
if [ -f "$f" ]; then
sed -i \
-e 's|Live system (amd64)|Run WROLPi (live)|g' \
-e 's|Live system (amd64 fail-safe mode)|Run WROLPi (live, fail-safe)|g' \
-e "s|'Start installer'|'Install WROLPi'|g" \
-e "s|'Start installer with speech synthesis'|'Install WROLPi (speech)'|g" \
"$f"
fi
2026-05-24 19:01:59 -06:00
done
# ISOLINUX (BIOS)
for f in isolinux/live.cfg \
isolinux/install.cfg; do
if [ -f "$f" ]; then
sed -i \
-e 's|Live system (amd64)|Run WROLPi (live)|g' \
-e 's|Live system (amd64 fail-safe mode)|Run WROLPi (live, fail-safe)|g' \
-e 's|Start ^installer|Install WROLPi|g' \
-e 's|Start installer with ^speech synthesis|Install WROLPi (speech)|g' \
"$f"
fi
2026-05-24 19:01:59 -06:00
done