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