summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-08-04 14:50:03 +0000
committerOlivier Blin <oblin@mandriva.com>2009-08-04 14:50:03 +0000
commite7065433756e0423b3a4af2dce8be1286212a534 (patch)
treee3f91036c3434d306c49cc585cc50835361565e3 /draklive
parent21c18989638648efdf9f94ccf291d991cc4f786a (diff)
downloaddrakiso-e7065433756e0423b3a4af2dce8be1286212a534.tar
drakiso-e7065433756e0423b3a4af2dce8be1286212a534.tar.gz
drakiso-e7065433756e0423b3a4af2dce8be1286212a534.tar.bz2
drakiso-e7065433756e0423b3a4af2dce8be1286212a534.tar.xz
drakiso-e7065433756e0423b3a4af2dce8be1286212a534.zip
pass boot device to install_usb_bootloader
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive14
1 files changed, 7 insertions, 7 deletions
diff --git a/draklive b/draklive
index 4d0d0bc..150151c 100755
--- a/draklive
+++ b/draklive
@@ -840,7 +840,7 @@ EOG
}
sub install_usb_bootloader {
- my ($live, $media, $opts) = @_;
+ my ($live, $media, $boot_device $opts) = @_;
my $media_boot = $live->get_media_prefix('boot', $opts->{boot});
my $device = get_media_device($live, $opts);
my $bootloader = $media->get_boot_setting('bootloader', $opts);
@@ -855,13 +855,13 @@ sub install_usb_bootloader {
# and get_bootloader_path (when copying)
mkdir_p($live->{mnt} . $media_boot . '/grub');
cp_f($live->get_builddir . $live->{prefix}{build}{boot} . '/gfxmenu', $live->{mnt} . $media_boot);
- output_p($live->{mnt} . $media_boot . '/grub/menu.lst', build_grub_cfg($live, $media, $opts, $device));
+ output_p($live->{mnt} . $media_boot . '/grub/menu.lst', build_grub_cfg($live, $media, $opts, $boot_device));
}
- if (-b $device) {
+ if (-b $boot_device) {
if ($bootloader eq 'syslinux') {
#- use syslinux -s, "safe, slow and stupid" version of SYSLINUX, unless specified otherwise
- run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $device)
+ run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $boot_device)
or die "unable to run syslinux on $device\n";
} elsif ($bootloader eq 'grub') {
my $master_device = $opts->{disk_device};
@@ -882,7 +882,7 @@ sub install_usb_bootloader {
} $local_grub_install;
my $grub_device_map = $live->{mnt} . $media_boot . "/grub/device.map";
unlink $grub_device_map;
- foreach ($master_device, $device) {
+ foreach ($master_device, $boot_device) {
run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_)
or die "unable to run grub on $device\n";
}
@@ -914,7 +914,7 @@ sub record_usb_master {
rm_rf($live->{mnt} . $media_boot) if -e $live->{mnt} . $media_boot;
cp_af($live->get_builddir . $live->{prefix}{build}{boot}, $live->{mnt} . $media_boot);
- install_usb_bootloader($live, $media, $opts);
+ install_usb_bootloader($live, $media, $opts->{device}, $opts);
do {
my $loopbacks_source = $live->get_builddir . $live->{prefix}{build}{loopbacks} . '/';
@@ -1154,7 +1154,7 @@ sub record_usb_replicator {
run_('mount', $device, $live->{mnt})
or die "unable to mount $device\n";
rm_rf($live->{mnt} . $media_boot) if -e $live->{mnt} . $media_boot;
- install_usb_bootloader($live, $media, $opts);
+ install_usb_bootloader($live, $media, $opts->{device}, $opts);
record_rescue_files($live->{mnt}, $device, [ get_disk_replicator_files($live) ]);
output_p($live->{mnt} . "/images/list", "EN,English," . basename(get_disk_image_path($live)) . ",on\n");