grubby-bls: only compare using relative paths if /boot is a mount point

The grub2 bootloader expects the BLS linux and initrd fields values to be
set to a relative path to the root of the boot partition and the zipl tool
expects these to be an absolute path to the kernel and initramfs images.

So the grubby wrapper was removing the prefixes from the kernel and initrd
paths before doing any comparision with the BLS fields. But this shouldn't
be done if the /boot directory isn't a mount point.

Resolves: rhbz#1642078

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-11-06 11:47:22 +01:00
parent 6ed71042bd
commit 7babbb04df
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
2 changed files with 3 additions and 1 deletions

View File

@ -686,7 +686,7 @@ if [[ -n $display_info ]]; then
display_info_values "${display_info}"
fi
if [[ $bootloader = grub2 ]]; then
if [[ $bootloader = grub2 ]] && grep -q /boot /proc/mounts; then
remove_var_prefix
fi

View File

@ -151,6 +151,8 @@ current boot environment.
Resolves: rhbz#1634752
- grubby-bls: fix --default-* options for s390x
Resolves: rhbz#1644608
- grubby-bls: only compare using relative paths if /boot is a mount point
Resolves: rhbz#1642078
* Fri Aug 10 2018 Javier Martinez Canillas <javierm@redhat.com> - 8.40-18
- Make installkernel to use kernel-install scripts on BLS configuration