2018-03-15 19:05:59 +00:00
|
|
|
From 7d9c29023e6c242306ae008a984245037655a23c Mon Sep 17 00:00:00 2001
|
2015-04-28 15:20:32 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Tue, 28 Apr 2015 11:15:03 -0400
|
2018-03-16 19:23:37 +00:00
|
|
|
Subject: [PATCH 131/216] Make grub2-mkconfig construct titles that look like
|
2017-06-16 19:31:32 +00:00
|
|
|
the ones we want elsewhere.
|
2015-04-28 15:20:32 +00:00
|
|
|
|
|
|
|
Resolves: rhbz#1215839
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
2018-02-27 18:56:41 +00:00
|
|
|
util/grub.d/10_linux.in | 32 ++++++++++++++++++++++----------
|
|
|
|
1 file changed, 22 insertions(+), 10 deletions(-)
|
2015-04-28 15:20:32 +00:00
|
|
|
|
|
|
|
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 1215241859b..584ad1f4639 100644
|
2015-04-28 15:20:32 +00:00
|
|
|
--- a/util/grub.d/10_linux.in
|
|
|
|
+++ b/util/grub.d/10_linux.in
|
2018-01-17 22:04:09 +00:00
|
|
|
@@ -70,11 +70,28 @@ esac
|
2015-04-28 15:20:32 +00:00
|
|
|
|
2018-01-17 22:04:09 +00:00
|
|
|
mktitle ()
|
|
|
|
{
|
|
|
|
- local OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
|
|
|
|
- local OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
|
2018-01-17 20:40:19 +00:00
|
|
|
+ local title_type
|
|
|
|
+ local version
|
|
|
|
+ local OS_NAME
|
|
|
|
+ local OS_VERS
|
2018-02-27 18:56:41 +00:00
|
|
|
|
|
|
|
- local titlestr="${OS_NAME} (%s) ${OS_VERS}"
|
|
|
|
- echo -n ${titlestr}
|
2018-01-17 20:40:19 +00:00
|
|
|
+ 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})"
|
|
|
|
+
|
|
|
|
+ case $title_type in
|
|
|
|
+ recovery)
|
|
|
|
+ title=$(printf '%s (%s) %s (recovery mode)' \
|
|
|
|
+ "${OS_NAME}" "${version}" "${OS_VERS}")
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ title=$(printf '%s (%s) %s' \
|
|
|
|
+ "${OS_NAME}" "${version}" "${OS_VERS}")
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+ echo -n ${title}
|
2018-01-17 22:04:09 +00:00
|
|
|
}
|
2015-04-28 15:20:32 +00:00
|
|
|
|
2018-01-17 22:04:09 +00:00
|
|
|
title_correction_code=
|
|
|
|
@@ -105,12 +122,7 @@ linux_entry ()
|
2018-01-17 20:40:19 +00:00
|
|
|
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
|
|
|
fi
|
2015-04-28 15:20:32 +00:00
|
|
|
if [ x$type != xsimple ] ; then
|
2018-01-17 20:40:19 +00:00
|
|
|
- case $type in
|
|
|
|
- recovery)
|
2018-01-17 22:04:09 +00:00
|
|
|
- title="$(printf "$(mktitle) (recovery mode)" "${version}")" ;;
|
2018-01-17 20:40:19 +00:00
|
|
|
- *)
|
2018-01-17 22:04:09 +00:00
|
|
|
- title="$(printf "$(mktitle)" "${version}")" ;;
|
2018-01-17 20:40:19 +00:00
|
|
|
- esac
|
|
|
|
+ title=$(mktitle "$type" "$version")
|
2015-04-28 15:20:32 +00:00
|
|
|
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
|
|
|
|
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
|
|
|
|
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
|
|
|
|
--
|
2018-02-27 18:56:41 +00:00
|
|
|
2.15.0
|
2015-04-28 15:20:32 +00:00
|
|
|
|