Blame SOURCES/0007-Make-installkernel-to-use-kernel-install-scripts-on-.patch

9067cc
From fa1bf7b54cb71fa193da16ffc404f8535d7d16ac Mon Sep 17 00:00:00 2001
9067cc
From: Javier Martinez Canillas <javierm@redhat.com>
9067cc
Date: Tue, 31 Jul 2018 17:43:53 +0200
9067cc
Subject: [PATCH 7/8] Make installkernel to use kernel-install scripts on BLS
9067cc
 configuration
9067cc
9067cc
The kernel make install target executes the arch/$ARCH/boot/install.sh
9067cc
that in turns executes the distro specific installkernel script. This
9067cc
script always uses new-kernel-pkg to install the kernel images.
9067cc
9067cc
But on a BootLoaderSpec setup, the kernel-install scripts must be used
9067cc
instead. Check if the system uses a BLS setup, and call kernel-install
9067cc
add in that case instead of new-kernel-pkg.
9067cc
9067cc
Reported-by: Hans de Goede <hdegoede@redhat.com>
9067cc
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
9067cc
---
9067cc
 installkernel | 7 +++++++
9067cc
 1 file changed, 7 insertions(+)
9067cc
9067cc
diff --git a/installkernel b/installkernel
9067cc
index b887929c179..68dcfac16d2 100755
9067cc
--- a/installkernel
9067cc
+++ b/installkernel
9067cc
@@ -20,6 +20,8 @@
9067cc
 # Author(s): tyson@rwii.com
9067cc
 #
9067cc
 
9067cc
+[[ -f /etc/default/grub ]] && . /etc/default/grub
9067cc
+
9067cc
 usage() {
9067cc
     echo "Usage: `basename $0` <kernel_version> <bootimage> <mapfile>" >&2
9067cc
     exit 1
9067cc
@@ -77,6 +79,11 @@ cp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
9067cc
 ln -fs ${RELATIVE_PATH}$INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION $LINK_PATH/$KERNEL_NAME
9067cc
 ln -fs ${RELATIVE_PATH}$INSTALL_PATH/System.map-$KERNEL_VERSION $LINK_PATH/System.map
9067cc
 
9067cc
+if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ] || [ ! -f /sbin/new-kernel-pkg ]; then
9067cc
+	kernel-install add $KERNEL_VERSION $INSTALL_PATH/$KERNEL_NAME-$KERNEL_VERSION
9067cc
+	exit $?
9067cc
+fi
9067cc
+
9067cc
 if [ -n "$cfgLoader" ] && [ -x /sbin/new-kernel-pkg ]; then
9067cc
 	if [ -n "$(which dracut 2>/dev/null)" ]; then
9067cc
 		new-kernel-pkg --mkinitrd --dracut --host-only --depmod --install --kernel-name $KERNEL_NAME $KERNEL_VERSION
9067cc
-- 
9067cc
2.17.1
9067cc