On 13.06.24 17:28, Lin wrote:

Hello, first time contributor here.
I'm not experienced with mailing lists and mailing patches so just let
me know if I do anything wrong :)

This patch simply allows that if GRUB_BACKGROUND and GRUB_THEME is set
at the same time, both pieces of code gets generated into grub.cfg by
grub-mkconfig.

If a theme is loaded, the background image will be visible inside the
console.

Already made my first mistake and got my patch reversed lol. Corrected
patch is below.

Again, when setting a GRUB_THEME, the elif disallows the GRUB_BACKGROUND
to be used, yet with my patch applied a set background image will not
interfere with the theme, but only be visible as the background for the
console when opened with 'c'.

Thanks,
Lin


diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index f86b69bad..4e8f25702 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -263,7 +263,9 @@ EOF
 set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
 export theme
 EOF
-    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+    fi
+
+    if [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
         && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
     gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
     case "$GRUB_BACKGROUND" in



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to