]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-install.in: Fix install non-PreP IEEE1275 install.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 8 Mar 2012 23:58:55 +0000 (00:58 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 8 Mar 2012 23:58:55 +0000 (00:58 +0100)
ChangeLog
util/grub-install.in

index 671b6af438ead22902a8326ca58e041dd4c8915f..942a7bddb3aeebafef2705a7bb280e19c8034490 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing
index f5ecffb7964d8aa6d9330f9403b8f18d55713b03..83ca9ef33268a382574b14b5a6f80e9442db2d55 100644 (file)
@@ -727,22 +727,23 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]
            echo "$1: Not found." 1>&2
            exit 1
        fi
-        # Get the Open Firmware device tree path translation.
-       dev="`echo $install_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`"
-       partno="`echo $install_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`"
-       ofpath="`$ofpathname $dev`" || {
+       if  [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" != "powerpc-ieee1275" ] \
+           || [ -z "${install_device}" ]; then
+         # Get the Open Firmware device tree path translation.
+           dev="`echo $grub_device | sed -e 's/\/dev\///' -e 's/[0-9]\+//'`"
+           partno="`echo $grub_device | sed -e 's/.*[^0-9]\([0-9]\+\)$/\1/'`"
+           ofpath="`$ofpathname $dev`" || {
            # TRANSLATORS: "device tree path" is the name of the device
             # for IEEE1275
-           gettext_printf "Couldn't find IEEE1275 device tree path for %s.\nYou will have to set \`boot-device' variable manually.\n" "$dev" 1>&2
-           exit 1
-       }
+               gettext_printf "Couldn't find IEEE1275 device tree path for %s.\nYou will have to set \`boot-device' variable manually.\n" "$dev" 1>&2
+               exit 1
+           }
 
-        # Point boot-device at the new grub install
-       boot_device="$ofpath:$partno,"`"$grub_mkrelpath" "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" | sed 's,/,\\\\,g'`
+            # Point boot-device at the new grub install
+           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  [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "powerpc-ieee1275" ] \
-           && [ -n "${install_device}" ]; then
+        # If a install device is defined, copy the core.elf to PReP partition.
+       else
             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
                echo 1>&2