grub2-mkconfig: Simplify os_name detection
This commit is contained in:
parent
9c6e5cf6c8
commit
72310e515d
30
0352-grub2-mkconfig-Simplify-os_name-detection.patch
Normal file
30
0352-grub2-mkconfig-Simplify-os_name-detection.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From ac5b2bc87a6c361fd504898a368f0867ef3e2679 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lukoshko <alukoshko@almalinux.org>
|
||||
Date: Wed, 31 Jul 2024 16:06:10 +0000
|
||||
Subject: [PATCH] grub2-mkconfig: Simplify os_name detection
|
||||
|
||||
---
|
||||
util/grub-mkconfig.in | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 7a0738b..ebf5150 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -114,12 +114,7 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
-os_name=$(grep '^ID=' /etc/os-release | sed 's/ID=//')
|
||||
-if test "$os_name" = '"rhel"'; then
|
||||
- os_name=redhat
|
||||
-elif test "$os_name" = '"centos"'; then
|
||||
- os_name=centos
|
||||
-fi
|
||||
+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
|
||||
gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2
|
||||
--
|
||||
2.43.5
|
||||
|
@ -349,3 +349,4 @@ Patch0348: 0348-add-flag-to-only-search-root-dev.patch
|
||||
Patch0349: 0349-Ignore-warnings-for-incompatible-types.patch
|
||||
Patch0350: 0350-fs-xfs-Fix-XFS-directory-extent-parsing.patch
|
||||
Patch0351: 0351-grub2-mkconfig-Ensure-grub-cfg-stub-is-not-overwritt.patch
|
||||
Patch0352: 0352-grub2-mkconfig-Simplify-os_name-detection.patch
|
||||
|
@ -17,7 +17,7 @@
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.06
|
||||
Release: 121%{?dist}
|
||||
Release: 122%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -573,6 +573,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jul 31 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 2.06-122
|
||||
- grub2-mkconfig: Simplify os_name detection
|
||||
- Resolves: #RHEL-32099
|
||||
|
||||
* Tue Jul 16 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-121
|
||||
- grub2-mkconfig: Prevent mkconfig from overwriting grub cfg stub
|
||||
- Resolves: #RHEL-32099
|
||||
|
Loading…
Reference in New Issue
Block a user