- force a BLS config if /boot/loader/entries directory exists (#1755899)

The /usr/lib/kernel/install.d/20-zipl-kernel.install script checks if the
/sbin/new-kernel-pkg script exists to determine whether a BLS config has
to be used or not.

This file should not exist in RHEL8 but it does in some corner cases for
example when doing an in-place upgrade from RHEL7 to RHEL8 since it is
required by the LEAPP tool for the RPM transaction to succeeded.

To cover that, not only check if the /sbin/new-kernel-pkg is not present
but also if the /boot/loader/entries directory exists and use either of
these as a condition to use a BLS configuration.
This commit is contained in:
Javier Martinez Canillas 2019-09-26 14:59:03 +02:00 committed by Dan Horák
parent 2cd85a32d2
commit b3e6ad36b4
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ case "$COMMAND" in
fi
fi
if [[ ! -f /sbin/new-kernel-pkg ]]; then
if [[ ! -f /sbin/new-kernel-pkg || -d "$BLS_DIR" ]]; then
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline