summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Finnie <ryan@finnie.org>2021-01-30 21:58:09 -0800
committerRyan Finnie <ryan@finnie.org>2021-01-30 21:58:09 -0800
commit5c838744d6e43752dc6d99c6569f89463316d5e8 (patch)
treed0936db8f498c47744b6479e0ea0a137f14b85d1
parentdc1a03d053b4e857a351c406d03d15bc0224d88d (diff)
downloadvyos-live-build-5c838744d6e43752dc6d99c6569f89463316d5e8.tar.gz
vyos-live-build-5c838744d6e43752dc6d99c6569f89463316d5e8.zip
binary_syslinux: Do not modify grub theme.txt if grub/splash.png exists
If grub/splash.png exists, assume the configuration editor intends to have a grub-specific splash.png, and do not modify theme.txt. But if syslinux has the only known splash.png, use it for both syslinux and grub. (This allows for a hybrid image where the grub side can have e.g. a 16:9 1920x1080 splash.png which gets grub is capable of automatically scaling, while the syslinux side has a 640x480 splash.png which effectively must be this fixed size.)
-rwxr-xr-xscripts/build/binary_syslinux4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index 2d1a84070..9b3d18ece 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -313,8 +313,8 @@ then
fi
rm -f "${_TARGET}/splash.svg"
-# Tweak the grub theme to reuse the syslinux background image
-if [ -e binary/boot/grub/live-theme/theme.txt ]; then
+# Tweak the grub theme to reuse the syslinux background image if grub doesn't have its own
+if [ -e binary/boot/grub/live-theme/theme.txt ] && [ ! -e binary/boot/grub/splash.png ]; then
sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \
-e 's|^title-text:.*|title-text: ""|' \
binary/boot/grub/live-theme/theme.txt