dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From cc3fa810197881a48c3fa8a1e6a1f97f5c251581 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Tue, 27 Feb 2018 21:18:55 +0100
Subject: [PATCH 1/1] kernel-install: Don't install BLS kernel images if dest
 dir doesn't exist

The script shouldn't rely on a previous script exiting with a status code
that prevents it to be executed. Instead, should check if the destination
directory for the BLS kernel image exists and exit otherwise.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
 src/kernel-install/90-loaderentry.install | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
index 305ea8f5c97f..a271cdb8a03e 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/kernel-install/90-loaderentry.install
@@ -11,6 +11,10 @@ if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
     exit 0
 fi
 
+if ! [[ -d "$BOOT_DIR_ABS" ]]; then
+    exit 0
+fi
+
 MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
 
 BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
-- 
2.14.3