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

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