From 7ab28c2157b9d8fbf7145a661c2dae2b4665591e Mon Sep 17 00:00:00 2001 From: robertmh Date: Wed, 29 Oct 2008 19:14:12 +0000 Subject: [PATCH] 2008-10-29 Robert Millan * util/i386/pc/grub-install.in: Handle empty string as output from make_system_path_relative_to_its_root(). --- ChangeLog | 5 +++++ util/i386/pc/grub-install.in | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e75ce8d5..02a5bbc04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-29 Robert Millan + + * util/i386/pc/grub-install.in: Handle empty string as output from + make_system_path_relative_to_its_root(). + 2008-10-05 Hans Lambermont * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the diff --git a/util/i386/pc/grub-install.in b/util/i386/pc/grub-install.in index 41805c0d1..4b39cbfdd 100644 --- a/util/i386/pc/grub-install.in +++ b/util/i386/pc/grub-install.in @@ -261,9 +261,12 @@ else 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} \