grub2-mkconfig: Remove mountpoint check
Related: #RHEL-32099 Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
This commit is contained in:
parent
17192e412c
commit
93795b8bea
@ -0,0 +1,29 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
Date: Thu, 1 Aug 2024 11:13:20 +0200
|
||||||
|
Subject: [PATCH] grub/mkconfig: Remove check for mount point for grub cfg stub
|
||||||
|
|
||||||
|
Remove mountpoint when checking whether or not the grub cfg stub
|
||||||
|
exists and add -s to the test. This should cover scenarios where
|
||||||
|
the ESP doesn't have a seperate partition but still uses a grub
|
||||||
|
cfg stub
|
||||||
|
|
||||||
|
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
---
|
||||||
|
util/grub-mkconfig.in | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||||
|
index a4972039b751..3f131eea2b12 100644
|
||||||
|
--- a/util/grub-mkconfig.in
|
||||||
|
+++ b/util/grub-mkconfig.in
|
||||||
|
@@ -115,8 +115,7 @@ do
|
||||||
|
done
|
||||||
|
|
||||||
|
os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
|
||||||
|
-if test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg" &&\
|
||||||
|
- mountpoint -q /boot/efi; then
|
||||||
|
+if test -s "${grub_cfg}" && test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg"; then
|
||||||
|
gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2
|
||||||
|
gettext_printf "Please run \`grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.\n" 1>&2
|
||||||
|
gettext_printf "GRUB configuration file was not updated.\n" 1>&2
|
@ -347,3 +347,4 @@ Patch0346: 0346-grub-mkconfig.in-turn-off-executable-owner-bit.patch
|
|||||||
Patch0347: 0347-grub2-mkconfig-Ensure-grub-cfg-stub-is-not-overwritt.patch
|
Patch0347: 0347-grub2-mkconfig-Ensure-grub-cfg-stub-is-not-overwritt.patch
|
||||||
Patch0348: 0348-chainloader-remove-device-path-debug-message.patch
|
Patch0348: 0348-chainloader-remove-device-path-debug-message.patch
|
||||||
Patch0349: 0349-grub2-mkconfig-Simplify-os_name-detection.patch
|
Patch0349: 0349-grub2-mkconfig-Simplify-os_name-detection.patch
|
||||||
|
Patch0350: 0350-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.06
|
Version: 2.06
|
||||||
Release: 89%{?dist}
|
Release: 90%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -540,6 +540,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 1 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-90
|
||||||
|
- grub2-mkconfig: Remove mountpoint check
|
||||||
|
- Related: #RHEL-32099
|
||||||
|
|
||||||
* Thu Aug 1 2024 Leo Sandoval <lsandova@redhat.com> - 2.06-89
|
* Thu Aug 1 2024 Leo Sandoval <lsandova@redhat.com> - 2.06-89
|
||||||
- Bump release number
|
- Bump release number
|
||||||
- Resolves: #RHEL-45870
|
- Resolves: #RHEL-45870
|
||||||
|
Loading…
Reference in New Issue
Block a user