[1887] 2008-10-29 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1887
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1887
Author:   robertmh
Date:     2008-10-29 19:14:12 +0000 (Wed, 29 Oct 2008)

Log Message:
-----------
2008-10-29  Robert Millan  <[email protected]>

        * util/i386/pc/grub-install.in: Handle empty string as output from
        make_system_path_relative_to_its_root().

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/i386/pc/grub-install.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-10-05 10:51:23 UTC (rev 1886)
+++ trunk/grub2/ChangeLog	2008-10-29 19:14:12 UTC (rev 1887)
@@ -1,3 +1,8 @@
+2008-10-29  Robert Millan  <[email protected]>
+
+	* util/i386/pc/grub-install.in: Handle empty string as output from
+	make_system_path_relative_to_its_root().
+
 2008-10-05  Hans Lambermont  <[email protected]>
 
 	* disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the

Modified: trunk/grub2/util/i386/pc/grub-install.in
===================================================================
--- trunk/grub2/util/i386/pc/grub-install.in	2008-10-05 10:51:23 UTC (rev 1886)
+++ trunk/grub2/util/i386/pc/grub-install.in	2008-10-29 19:14:12 UTC (rev 1887)
@@ -261,9 +261,12 @@
     prefix_drive=`$grub_probe --target=drive --device ${grub_device}`
 fi
 
-grub_prefix="${prefix_drive}`make_system_path_relative_to_its_root ${grubdir}`" || exit 1
+relative_grubdir=`make_system_path_relative_to_its_root ${grubdir}` || exit 1
+if [ "x${relative_grubdir}" = "x" ] ; then
+    relative_grubdir=/
+fi
 
-$grub_mkimage --output=${grubdir}/core.img --prefix=${grub_prefix} $modules || exit 1
+$grub_mkimage --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1
 
 # Now perform the installation.
 $grub_setup ${setup_verbose} --directory=${grubdir} --device-map=${device_map} \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.