Blame SOURCES/0015-If-we-re-on-a-zipl-based-platform-use-banner-passed-.patch

775cb0
From f4ba2c9deba2a6575668c1c602621b3f596a7ea6 Mon Sep 17 00:00:00 2001
775cb0
From: Peter Jones <pjones@redhat.com>
775cb0
Date: Wed, 22 Jan 2014 17:16:06 -0500
775cb0
Subject: [PATCH 15/16] If we're on a zipl-based platform, use --banner passed
775cb0
 to us (sanitized.)
775cb0
775cb0
"lilo" type bootloaders have gotten $version as their title since
775cb0
forever, but on zipl that'll cause collisions when creating extra boot
775cb0
images with the same version.  So on that platform, choose to honor
775cb0
--banner even though it has a lot of limitations, and attempt to get rid
775cb0
of spaces in the result to avoid some of those problems.
775cb0
775cb0
Related: rhbz#1032048
775cb0
775cb0
Signed-off-by: Peter Jones <pjones@redhat.com>
775cb0
---
775cb0
 new-kernel-pkg | 14 ++++++++++----
775cb0
 1 file changed, 10 insertions(+), 4 deletions(-)
775cb0
775cb0
diff --git a/new-kernel-pkg b/new-kernel-pkg
775cb0
index fe0d55a..d9a9b67 100755
775cb0
--- a/new-kernel-pkg
775cb0
+++ b/new-kernel-pkg
775cb0
@@ -186,10 +186,16 @@ install() {
775cb0
 
775cb0
 
775cb0
     if [ -n "$banner" ]; then
775cb0
-        title="$banner ($version)"
775cb0
+	if [ $ARCH = 's390' -o $ARCH = 's390x' ]; then
775cb0
+	    title=$(echo $banner | sed 's/ /_/g')
775cb0
+	else
775cb0
+	    title="$banner ($version)"
775cb0
+	fi
775cb0
+    elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then
775cb0
+	title=$(echo $version | sed 's/ /_/g')
775cb0
     elif [ -f /etc/os-release ]; then
775cb0
-        . /etc/os-release
775cb0
-        title="$NAME ($version) $VERSION"
775cb0
+	. /etc/os-release
775cb0
+	title="$NAME ($version) $VERSION"
775cb0
     elif [ -f /etc/redhat-release ]; then
775cb0
 	title="$(sed 's/ release.*$//' < /etc/redhat-release) ($version)"
775cb0
     else
775cb0
@@ -237,7 +243,7 @@ install() {
775cb0
 	[ -n "$verbose" ] && echo "adding $version to $liloConfig"
775cb0
 
775cb0
 	$grubby --add-kernel=$kernelImage $INITRD \
775cb0
-		--copy-default $makedefault --title $version \
775cb0
+		--copy-default $makedefault --title "$title" \
775cb0
 		${mbkernel:+--add-multiboot="$mbkernel"} ${mbargs:+--mbargs="$mbargs"} \
775cb0
 		--args="root=$rootdevice $kernargs" --remove-kernel="TITLE=$version" \
775cb0
 		--$liloFlag
775cb0
-- 
775cb0
1.9.3
775cb0