mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
More fixes for BLS
Add some fixes for BLS parsing logic and also make 20-grub.install script to query the relative path of the kernel and initramfs images, so BLS can also work when /boot is not a mount point or is a btrfs subvolume. Also pull some build fixes. Resolves: rhbz#1588184 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
cee2256e1c
commit
64420615c2
1 changed files with 10 additions and 0 deletions
|
@ -87,6 +87,16 @@ case "$COMMAND" in
|
||||||
>"${BLS_TARGET}"
|
>"${BLS_TARGET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LINUX="$(grep '^linux[ \t]' "${BLS_TARGET}" | sed -e 's,^linux[ \t]*,,')"
|
||||||
|
INITRD="$(grep '^initrd[ \t]' "${BLS_TARGET}" | sed -e 's,^initrd[ \t]*,,')"
|
||||||
|
LINUX_RELPATH="$(grub2-mkrelpath /boot${LINUX})"
|
||||||
|
BOOTPREFIX="$(dirname ${LINUX_RELPATH})"
|
||||||
|
|
||||||
|
if [[ $LINUX != $LINUX_RELPATH ]]; then
|
||||||
|
sed -i -e "s,^linux.*,linux ${BOOTPREFIX}${LINUX},g" "${BLS_TARGET}"
|
||||||
|
sed -i -e "s,^initrd.*,initrd ${BOOTPREFIX}${INITRD},g" "${BLS_TARGET}"
|
||||||
|
fi
|
||||||
|
|
||||||
eval "$(grub2-get-kernel-settings)" || true
|
eval "$(grub2-get-kernel-settings)" || true
|
||||||
if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
|
if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
|
|
Loading…
Reference in a new issue