2018-03-15 19:05:59 +00:00
|
|
|
From 5948f763fc01d7f29923e94ef9b1ed923b11ff1a Mon Sep 17 00:00:00 2001
|
2014-09-29 15:48:01 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Thu, 4 Sep 2014 14:23:23 -0400
|
2018-03-16 19:23:37 +00:00
|
|
|
Subject: [PATCH 121/216] Generate OS and CLASS in 10_linux from
|
2017-06-16 19:31:32 +00:00
|
|
|
/etc/os-release
|
2014-09-29 15:48:01 +00:00
|
|
|
|
|
|
|
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
|
2018-02-27 18:56:41 +00:00
|
|
|
index a9692a0c2a2..c6627268cca 100644
|
2014-09-29 15:48:01 +00:00
|
|
|
--- 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}"
|
|
|
|
--
|
2018-02-27 18:56:41 +00:00
|
|
|
2.15.0
|
2014-09-29 15:48:01 +00:00
|
|
|
|