* util/grub-install.in: Fix install non-PreP IEEE1275 install.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-09 00:58:55 +01:00
parent 5fd1c522d4
commit dd3907779e
2 changed files with 17 additions and 12 deletions

View file

@ -1,3 +1,7 @@
2012-03-09 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-install.in: Fix install non-PreP IEEE1275 install.
2012-03-09 Vladimir Serbinenko <phcoder@gmail.com> 2012-03-09 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing * grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing

View file

@ -727,9 +727,11 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]
echo "$1: Not found." 1>&2 echo "$1: Not found." 1>&2
exit 1 exit 1
fi fi
if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" != "powerpc-ieee1275" ] \
|| [ -z "${install_device}" ]; then
# Get the Open Firmware device tree path translation. # Get the Open Firmware device tree path translation.
dev="`echo $install_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`" dev="`echo $grub_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`"
partno="`echo $install_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`" partno="`echo $grub_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`"
ofpath="`$ofpathname $dev`" || { ofpath="`$ofpathname $dev`" || {
# TRANSLATORS: "device tree path" is the name of the device # TRANSLATORS: "device tree path" is the name of the device
# for IEEE1275 # for IEEE1275
@ -741,8 +743,7 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]
boot_device="$ofpath:$partno,"`"$grub_mkrelpath" "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" | sed 's,/,\\\\,g'` boot_device="$ofpath:$partno,"`"$grub_mkrelpath" "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" | sed 's,/,\\\\,g'`
# If a install device is defined, copy the core.elf to PReP partition. # If a install device is defined, copy the core.elf to PReP partition.
if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "powerpc-ieee1275" ] \ else
&& [ -n "${install_device}" ]; then
if [ "$("${grub_probe}" -m "${device_map}" -d "${install_device}" -t msdos_parttype)" != "41" ]; then if [ "$("${grub_probe}" -m "${device_map}" -d "${install_device}" -t msdos_parttype)" != "41" ]; then
gettext "The chosen partition is not a PReP partition." 1>&2 gettext "The chosen partition is not a PReP partition." 1>&2
echo 1>&2 echo 1>&2