[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/17] 10_linux.in: Generate OS and CLASS in 10_linux from /et
From: |
Leo Sandoval |
Subject: |
[PATCH v2 16/17] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/os-release |
Date: |
Mon, 7 Oct 2024 12:18:07 -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 66418f65d..3105c31e4 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=GNU/Linux
+ 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} GNU/Linux"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' '
-f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
--
2.46.2
- [PATCH v2 10/17] 10_linux.in: Add devicetree loading, (continued)
- [PATCH v2 10/17] 10_linux.in: Add devicetree loading, Leo Sandoval, 2024/10/07
- [PATCH v2 05/17] misc: Make "exit" take a return code., Leo Sandoval, 2024/10/07
- [PATCH v2 12/17] Makefile.common: Add .eh_frame to list of relocations stripped, Leo Sandoval, 2024/10/07
- [PATCH v2 11/17] 00_header.in: Enable pager by default. (#985860), Leo Sandoval, 2024/10/07
- [PATCH v2 14/17] normal/main: fw_path prefix when fallback searching for grub config, Leo Sandoval, 2024/10/07
- [PATCH v2 17/17] normal/main: Try $prefix if $fw_path doesn't work., Leo Sandoval, 2024/10/07
- [PATCH v2 06/17] efi/init: Make efi machines load an env block from a variable, Leo Sandoval, 2024/10/07
- [PATCH v2 01/17] ieee1275/openfw: IBM client architecture (CAS) reboot support, Leo Sandoval, 2024/10/07
- [PATCH v2 13/17] 10_linux.in: Don't require a password to boot entries generated by grub-mkconfig., Leo Sandoval, 2024/10/07
- [PATCH v2 16/17] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/os-release,
Leo Sandoval <=
- [PATCH v2 15/17] normal/main: Try mac/guid/etc before grub.cfg on tftp config files., Leo Sandoval, 2024/10/07