dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0041-Don-t-say-GNU-Linux-in-generated-menus.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Peter Jones <pjones@redhat.com>
8631a2
Date: Mon, 14 Mar 2011 14:27:42 -0400
8631a2
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
8631a2
8631a2
---
8631a2
 util/grub.d/10_linux.in     | 4 ++--
8631a2
 util/grub.d/20_linux_xen.in | 4 ++--
8631a2
 2 files changed, 4 insertions(+), 4 deletions(-)
8631a2
8631a2
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
8631a2
index 3a5aa0f8dc9..6299836b5cd 100644
8631a2
--- a/util/grub.d/10_linux.in
8631a2
+++ b/util/grub.d/10_linux.in
8631a2
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
8631a2
 CLASS="--class gnu-linux --class gnu --class os"
8631a2
 
8631a2
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
8631a2
-  OS=GNU/Linux
8631a2
+  OS="$(sed 's, release .*$,,g' /etc/system-release)"
8631a2
 else
8631a2
-  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
8631a2
+  OS="${GRUB_DISTRIBUTOR}"
8631a2
   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
8631a2
 fi
8631a2
 
8631a2
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
8631a2
index e8143b079dc..972a4b5a03d 100644
8631a2
--- a/util/grub.d/20_linux_xen.in
8631a2
+++ b/util/grub.d/20_linux_xen.in
8631a2
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
8631a2
 CLASS="--class gnu-linux --class gnu --class os --class xen"
8631a2
 
8631a2
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
8631a2
-  OS=GNU/Linux
8631a2
+  OS="$(sed 's, release .*$,,g' /etc/system-release)"
8631a2
 else
8631a2
-  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
8631a2
+  OS="${GRUB_DISTRIBUTOR}"
8631a2
   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
8631a2
 fi
8631a2