[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 19/20] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/o
From: |
Leo Sandoval |
Subject: |
[PATCH 19/20] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/os-release |
Date: |
Mon, 30 Sep 2024 11:43:48 -0600 |
From: Peter Jones <pjones@redhat.com>
This makes us use pretty names in the titles we generate in
grub2-mkconfig when GRUB_DISTRIBUTOR isn't set.
Resolves: rhbz#996794
Signed-off-by: Peter Jones <pjones@redhat.com>
---
util/grub.d/10_linux.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 9c31a94de..b7809091b 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -29,7 +29,8 @@ export TEXTDOMAINDIR="@localedir@"
CLASS="--class gnu-linux --class gnu --class os --unrestricted"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS="$(sed 's, release .*$,,g' /etc/system-release)"
+ OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})"
+ CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n
"${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}"
else
OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' '
-f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
--
2.46.1
- [PATCH 17/20] normal/main: fw_path prefix when fallback searching for grub config, (continued)
- [PATCH 17/20] normal/main: fw_path prefix when fallback searching for grub config, Leo Sandoval, 2024/09/30
- [PATCH 08/20] 20_ppc_terminfo.in: Migrate PPC from Yaboot to Grub2, Leo Sandoval, 2024/09/30
- [PATCH 05/20] normal/menu: Allow "fallback" to include entries by title, not just number., Leo Sandoval, 2024/09/30
- [PATCH 09/20] normal: Add fw_path variable (revised), Leo Sandoval, 2024/09/30
- [PATCH 15/20] Makefile.common: Add .eh_frame to list of relocations stripped, Leo Sandoval, 2024/09/30
- [PATCH 13/20] 00_header.in: Enable pager by default. (#985860), Leo Sandoval, 2024/09/30
- [PATCH 18/20] normal/main: Try mac/guid/etc before grub.cfg on tftp config files., Leo Sandoval, 2024/09/30
- [PATCH 16/20] 10_linux.in: Don't require a password to boot entries generated by grub-mkconfig., Leo Sandoval, 2024/09/30
- [PATCH 19/20] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/os-release,
Leo Sandoval <=
- [PATCH 20/20] normal/main: Try $prefix if $fw_path doesn't work., Leo Sandoval, 2024/09/30
- [PATCH 11/20] blscfg: add blscfg module to parse Boot Loader Specification snippets, Leo Sandoval, 2024/09/30
- [PATCH 12/20] 10_linux.in: Add devicetree loading, Leo Sandoval, 2024/09/30
- [PATCH 06/20] misc: Make "exit" take a return code., Leo Sandoval, 2024/09/30
- [PATCH 14/20] 10_linux.in 20_linux_xen.in: Don't say "GNU/Linux" in generated menus., Leo Sandoval, 2024/09/30
- [PATCH 03/20] ieee1275: Disable GRUB video support for IBM power machines, Leo Sandoval, 2024/09/30