Blame SOURCES/0147-Include-OSTree-path-when-searching-kernels-images-if.patch

d9d99f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d9d99f
From: Javier Martinez Canillas <javierm@redhat.com>
d9d99f
Date: Tue, 24 Apr 2018 02:28:04 +0200
d9d99f
Subject: [PATCH] Include OSTree path when searching kernels images if BLS
d9d99f
 config is enabled
d9d99f
d9d99f
The OSTree based distros (i.e: Fedora Atomic) don't install kernel images
d9d99f
in the /boot directory, but in /boot/ostree. So the 10_linux script isn't
d9d99f
able to include these kernels in its list, so the linux_entry() function
d9d99f
is never called.
d9d99f
d9d99f
This isn't a problem since the 10_linux script isn't used to populate the
d9d99f
menu entries anyways, but instead a custom 15_ostree script is used. But
d9d99f
for BLS we want the 10_linux script to generate the minimal grub.cfg that
d9d99f
calls the blscfg command, so add the OSTree kernel images to the list.
d9d99f
d9d99f
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
d9d99f
---
d9d99f
 util/grub.d/10_linux.in | 6 ++++++
d9d99f
 1 file changed, 6 insertions(+)
d9d99f
d9d99f
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
d9d99f
index 61d0664fb5c..9682e97b7f5 100644
d9d99f
--- a/util/grub.d/10_linux.in
d9d99f
+++ b/util/grub.d/10_linux.in
d9d99f
@@ -237,6 +237,12 @@ case "x$machine" in
d9d99f
 	done ;;
d9d99f
 esac
d9d99f
 
d9d99f
+if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then
d9d99f
+    for i in /boot/ostree/*/vmlinuz-* ; do
d9d99f
+        if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
d9d99f
+    done
d9d99f
+fi
d9d99f
+
d9d99f
 case "$machine" in
d9d99f
     i?86) GENKERNEL_ARCH="x86" ;;
d9d99f
     mips|mips64) GENKERNEL_ARCH="mips" ;;