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

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Peter Jones <pjones@redhat.com>
5593c8
Date: Mon, 14 Mar 2011 14:27:42 -0400
5593c8
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
5593c8
fd0330
[rharwood: say it even less]
5593c8
---
fd0330
 grub-core/normal/main.c         | 2 +-
fd0330
 tests/util/grub-shell-tester.in | 2 +-
fd0330
 tests/util/grub-shell.in        | 2 +-
fd0330
 util/grub.d/10_linux.in         | 4 ++--
fd0330
 util/grub.d/20_linux_xen.in     | 4 ++--
fd0330
 5 files changed, 7 insertions(+), 7 deletions(-)
5593c8
fd0330
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
fd0330
index 7ca2e5400b..98372217ad 100644
fd0330
--- a/grub-core/normal/main.c
fd0330
+++ b/grub-core/normal/main.c
fd0330
@@ -218,7 +218,7 @@ grub_normal_init_page (struct grub_term_output *term,
fd0330
  
fd0330
   grub_term_cls (term);
fd0330
 
fd0330
-  msg_formatted = grub_xasprintf (_("GNU GRUB  version %s"), PACKAGE_VERSION);
fd0330
+  msg_formatted = grub_xasprintf (_("GRUB version %s"), PACKAGE_VERSION);
fd0330
   if (!msg_formatted)
fd0330
     return;
fd0330
  
fd0330
diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in
fd0330
index 8a87109b15..9a4319d4f4 100644
fd0330
--- a/tests/util/grub-shell-tester.in
fd0330
+++ b/tests/util/grub-shell-tester.in
fd0330
@@ -56,7 +56,7 @@ for option in "$@"; do
fd0330
 	usage
fd0330
 	exit 0 ;;
fd0330
     -v | --version)
fd0330
-	echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
fd0330
+	echo "$0 (GRUB ${PACKAGE_VERSION})"
fd0330
 	exit 0 ;;
fd0330
     --modules=*)
fd0330
 	ms=`echo "$option" | sed -e 's/--modules=//'`
fd0330
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
fd0330
index 93e9f51484..ec1182bf93 100644
fd0330
--- a/tests/util/grub-shell.in
fd0330
+++ b/tests/util/grub-shell.in
fd0330
@@ -209,7 +209,7 @@ for option in "$@"; do
fd0330
 	usage
fd0330
 	exit 0 ;;
fd0330
     -v | --version)
fd0330
-	echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
fd0330
+	echo "$0 (GRUB ${PACKAGE_VERSION})"
fd0330
 	exit 0 ;;
fd0330
     --trim)
fd0330
 	trim=1
5593c8
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
fd0330
index dc75a1c30b..4a499c53a6 100644
5593c8
--- a/util/grub.d/10_linux.in
5593c8
+++ b/util/grub.d/10_linux.in
5593c8
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
5593c8
 CLASS="--class gnu-linux --class gnu --class os"
5593c8
 
5593c8
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
5593c8
-  OS=GNU/Linux
5593c8
+  OS="$(sed 's, release .*$,,g' /etc/system-release)"
5593c8
 else
5593c8
-  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
5593c8
+  OS="${GRUB_DISTRIBUTOR}"
5593c8
   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
5593c8
 fi
5593c8
 
5593c8
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
fd0330
index 3b1f470492..ada20775a1 100644
5593c8
--- a/util/grub.d/20_linux_xen.in
5593c8
+++ b/util/grub.d/20_linux_xen.in
5593c8
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
5593c8
 CLASS="--class gnu-linux --class gnu --class os --class xen"
5593c8
 
5593c8
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
5593c8
-  OS=GNU/Linux
5593c8
+  OS="$(sed 's, release .*$,,g' /etc/system-release)"
5593c8
 else
5593c8
-  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
5593c8
+  OS="${GRUB_DISTRIBUTOR}"
5593c8
   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
5593c8
 fi
5593c8