From 4e66d1d0beed8a9b8c787b2f6d80239888907c33 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 25 Sep 2008 10:21:37 +0000 Subject: use optional disk_device if specified --- draklive | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'draklive') diff --git a/draklive b/draklive index 1997d48..2932f62 100755 --- a/draklive +++ b/draklive @@ -1434,6 +1434,11 @@ sub install_usb_bootloader { run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $device) or die "unable to run syslinux on $device\n"; } elsif ($bootloader eq 'grub') { + my $master_device = $opts->{disk_device}; + if (!$master_device) { + $master_device = $device; + $master_device =~ s/(\d+)$//; + } my $local_grub_install = get_builddir($live) . $live->{prefix}{build}{scripts} . '/grub-install'; mkdir_p(dirname($local_grub_install)); cp_f(get_system_root($live) . '/sbin/grub-install', $local_grub_install); @@ -1443,9 +1448,6 @@ sub install_usb_bootloader { s!^\s*grub_prefix=/boot/!grub_prefix=${media_boot}/!; s!^\s*bootdir=(.*)/boot$!bootdir=$1${media_boot}!; } $local_grub_install; - - my $master_device = $device; - $master_device =~ s/(\d+)$//; foreach ($master_device, $device) { run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_) or die "unable to run grub on $device\n"; -- cgit v1.2.1