summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-09-25 10:21:37 +0000
committerOlivier Blin <oblin@mandriva.com>2008-09-25 10:21:37 +0000
commit4e66d1d0beed8a9b8c787b2f6d80239888907c33 (patch)
treedcb399c77406d359f4827a847da8dece74d3807b /draklive
parent916a500c4bfdf5eca068d4785f1297d3aa5bfbf0 (diff)
downloaddrakiso-4e66d1d0beed8a9b8c787b2f6d80239888907c33.tar
drakiso-4e66d1d0beed8a9b8c787b2f6d80239888907c33.tar.gz
drakiso-4e66d1d0beed8a9b8c787b2f6d80239888907c33.tar.bz2
drakiso-4e66d1d0beed8a9b8c787b2f6d80239888907c33.tar.xz
drakiso-4e66d1d0beed8a9b8c787b2f6d80239888907c33.zip
use optional disk_device if specified
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive8
1 files changed, 5 insertions, 3 deletions
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";