fe507e9
From 28d9f3965f095a765ec8aaa589b4e04608b69901 Mon Sep 17 00:00:00 2001
fe507e9
From: Peter Jones <pjones@redhat.com>
fe507e9
Date: Fri, 25 May 2012 14:57:38 -0400
fe507e9
Subject: [PATCH] Don't set boot device on ppc-ieee1275
fe507e9
fe507e9
This started with the problem that powerkvm doesn't have /dev/nvram and so
fe507e9
there is no way to set boot-device.
fe507e9
---
fe507e9
 util/grub-install.in |   18 ++++++++++--------
fe507e9
 1 file changed, 10 insertions(+), 8 deletions(-)
fe507e9
fe507e9
diff --git a/util/grub-install.in b/util/grub-install.in
a37bbab
index e19f1cd..69a97ad 100644
fe507e9
--- a/util/grub-install.in
fe507e9
+++ b/util/grub-install.in
a37bbab
@@ -807,14 +807,16 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]
fe507e9
 	    }
fe507e9
 	fi
fe507e9
 
fe507e9
-	"$nvsetenv" boot-device "$boot_device" || {
fe507e9
-	    # TRANSLATORS: The %s will be replaced by an external program name.
fe507e9
-	    gettext_printf "\`%s' failed.\n" "$nvsetenv" 1>&2
fe507e9
-	    gettext "You will have to set \`boot-device' variable manually.  At the IEEE1275 prompt, type:" 1>&2
fe507e9
-	    echo 1>&2
fe507e9
-	    echo "  setenv boot-device $boot_device" 1>&2
fe507e9
-	    exit 1
fe507e9
-	}
fe507e9
+	if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]; then
fe507e9
+	    "$nvsetenv" boot-device "$boot_device" || {
fe507e9
+	        # TRANSLATORS: The %s will be replaced by an external program name.
fe507e9
+	        gettext_printf "\`%s' failed.\n" "$nvsetenv" 1>&2
fe507e9
+	        gettext "You will have to set \`boot-device' variable manually.  At the IEEE1275 prompt, type:" 1>&2
fe507e9
+	        echo 1>&2
fe507e9
+	        echo "  setenv boot-device $boot_device" 1>&2
fe507e9
+	        exit 1
fe507e9
+	    }
fe507e9
+	fi
fe507e9
     fi
fe507e9
 elif [ x"${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = xmips-arc ]; then
a37bbab
     dvhtool -d "${install_device}" --unix-to-vh "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" grub