]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: Don't install BLS kernel images if dest dir doesn't exist (#8306)
authorJavier Martinez Canillas <javier@dowhile0.org>
Wed, 28 Feb 2018 09:25:19 +0000 (10:25 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Feb 2018 09:25:19 +0000 (10:25 +0100)
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.

src/kernel-install/90-loaderentry.install

index 305ea8f5c97f9466376daf6e4aa8f6b11619edb0..a271cdb8a03ecd2b0753c86c5914a74b8aa5a4bd 100644 (file)
@@ -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"