Blame SOURCES/0147-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch
|
|
a85e8e |
From c34b472bcc4b11f00a6cf699016aeec464a77d1d Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Peter Jones <pjones@redhat.com>
|
|
|
a85e8e |
Date: Thu, 4 Sep 2014 14:23:23 -0400
|
|
|
a85e8e |
Subject: [PATCH 147/260] Generate OS and CLASS in 10_linux from
|
|
|
a85e8e |
/etc/os-release
|
|
|
a85e8e |
|
|
|
a85e8e |
This makes us use pretty names in the titles we generate in
|
|
|
a85e8e |
grub2-mkconfig when GRUB_DISTRIBUTOR isn't set.
|
|
|
a85e8e |
|
|
|
a85e8e |
Resolves: rhbz#996794
|
|
|
a85e8e |
|
|
|
a85e8e |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
a85e8e |
---
|
|
|
a85e8e |
util/grub.d/10_linux.in | 3 ++-
|
|
|
a85e8e |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
|
a85e8e |
index 8782d8c67..e8088a181 100644
|
|
|
a85e8e |
--- a/util/grub.d/10_linux.in
|
|
|
a85e8e |
+++ b/util/grub.d/10_linux.in
|
|
|
a85e8e |
@@ -29,7 +29,8 @@ export TEXTDOMAINDIR="@localedir@"
|
|
|
a85e8e |
CLASS="--class gnu-linux --class gnu --class os --unrestricted"
|
|
|
a85e8e |
|
|
|
a85e8e |
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
|
|
a85e8e |
- OS="$(sed 's, release .*$,,g' /etc/system-release)"
|
|
|
a85e8e |
+ OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})"
|
|
|
a85e8e |
+ CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n "${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}"
|
|
|
a85e8e |
else
|
|
|
a85e8e |
OS="${GRUB_DISTRIBUTOR}"
|
|
|
a85e8e |
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|