gplv3/grub2/centos/patches/1000_linux-mktitle-de-brand...

48 lines
1.3 KiB
Diff

From 6934956143557c548cc35dcc272aae1ee3d706c8 Mon Sep 17 00:00:00 2001
From: RHEL Ninjas <example@example.com>
Date: Wed, 5 Oct 2016 15:14:28 -0400
Subject: [PATCH] 10_linux: mktitle: de-brand the grub.cfg menu
Replace "CentOS" with a generic name.
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
---
util/grub.d/10_linux.in | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index b3c460c..131c1f2 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -71,22 +71,20 @@ mktitle ()
local title_type
local version
local OS_NAME
- local OS_VERS
title_type=$1 && shift
version=$1 && shift
- OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
- OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
+ OS_NAME="Linux"
case $title_type in
recovery)
- title=$(printf '%s (%s) %s (recovery mode)' \
- "${OS_NAME}" "${version}" "${OS_VERS}")
+ title=$(printf '%s (%s) (recovery mode)' \
+ "${OS_NAME}" "${version}")
;;
*)
- title=$(printf '%s (%s) %s' \
- "${OS_NAME}" "${version}" "${OS_VERS}")
+ title=$(printf '%s (%s)' \
+ "${OS_NAME}" "${version}")
;;
esac
echo -n ${title}
--
1.8.3.1