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.
This commit is contained in:
Javier Martinez Canillas 2018-02-28 10:25:19 +01:00 committed by Lennart Poettering
parent ba7f4ae617
commit 81818461c6
1 changed files with 4 additions and 0 deletions

View 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"