From: Javier Martinez Canillas Date: Wed, 28 Feb 2018 09:25:19 +0000 (+0100) Subject: kernel-install: Don't install BLS kernel images if dest dir doesn't exist (#8306) X-Git-Tag: v238~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81818461c655a5c3adec4f3bc221aa986d9c65b6;p=thirdparty%2Fsystemd.git kernel-install: Don't install BLS kernel images if dest dir doesn't exist (#8306) 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. --- diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index 305ea8f5c97..a271cdb8a03 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"