teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0999-kernel-install-Don-t-install-BLS-kernel-images-if-de.patch

Javier Martinez Canillas fd0679
From cc3fa810197881a48c3fa8a1e6a1f97f5c251581 Mon Sep 17 00:00:00 2001
Javier Martinez Canillas fd0679
From: Javier Martinez Canillas <javierm@redhat.com>
Javier Martinez Canillas fd0679
Date: Tue, 27 Feb 2018 21:18:55 +0100
Javier Martinez Canillas fd0679
Subject: [PATCH 1/1] kernel-install: Don't install BLS kernel images if dest
Javier Martinez Canillas fd0679
 dir doesn't exist
Javier Martinez Canillas fd0679
Javier Martinez Canillas fd0679
The script shouldn't rely on a previous script exiting with a status code
Javier Martinez Canillas fd0679
that prevents it to be executed. Instead, should check if the destination
Javier Martinez Canillas fd0679
directory for the BLS kernel image exists and exit otherwise.
Javier Martinez Canillas fd0679
Javier Martinez Canillas fd0679
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Javier Martinez Canillas fd0679
---
Javier Martinez Canillas fd0679
 src/kernel-install/90-loaderentry.install | 4 ++++
Javier Martinez Canillas fd0679
 1 file changed, 4 insertions(+)
Javier Martinez Canillas fd0679
Javier Martinez Canillas fd0679
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
Javier Martinez Canillas fd0679
index 305ea8f5c97f..a271cdb8a03e 100644
Javier Martinez Canillas fd0679
--- a/src/kernel-install/90-loaderentry.install
Javier Martinez Canillas fd0679
+++ b/src/kernel-install/90-loaderentry.install
Javier Martinez Canillas fd0679
@@ -11,6 +11,10 @@ if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
Javier Martinez Canillas fd0679
     exit 0
Javier Martinez Canillas fd0679
 fi
Javier Martinez Canillas fd0679
 
Javier Martinez Canillas fd0679
+if ! [[ -d "$BOOT_DIR_ABS" ]]; then
Javier Martinez Canillas fd0679
+    exit 0
Javier Martinez Canillas fd0679
+fi
Javier Martinez Canillas fd0679
+
Javier Martinez Canillas fd0679
 MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
Javier Martinez Canillas fd0679
 
Javier Martinez Canillas fd0679
 BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
Javier Martinez Canillas fd0679
-- 
Javier Martinez Canillas fd0679
2.14.3
Javier Martinez Canillas fd0679