summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-09-25 10:24:15 +0000
committerOlivier Blin <oblin@mandriva.com>2008-09-25 10:24:15 +0000
commitb9f749ec7a1ca5579b1724c92a9549d0a48d1e01 (patch)
tree4b338f46859f8c656a958e07b3372dad092c51fd
parent4e66d1d0beed8a9b8c787b2f6d80239888907c33 (diff)
downloaddrakiso-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar
drakiso-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.gz
drakiso-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.bz2
drakiso-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.xz
drakiso-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.zip
do not use custom grub-install for master images
-rwxr-xr-xdraklive26
1 files changed, 14 insertions, 12 deletions
diff --git a/draklive b/draklive
index 2932f62..f77b681 100755
--- a/draklive
+++ b/draklive
@@ -1439,18 +1439,20 @@ sub install_usb_bootloader {
$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);
- my $root = get_system_root($live);
- substInFile {
- s!^\s*exec_prefix=.*!exec_prefix=$root!;
- s!^\s*grub_prefix=/boot/!grub_prefix=${media_boot}/!;
- s!^\s*bootdir=(.*)/boot$!bootdir=$1${media_boot}!;
- } $local_grub_install;
- foreach ($master_device, $device) {
- run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_)
- or die "unable to run grub on $device\n";
+ if ($master_device =~ m!/dev/!) {
+ 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);
+ my $root = get_system_root($live);
+ substInFile {
+ s!^\s*exec_prefix=.*!exec_prefix=$root!;
+ s!^\s*grub_prefix=/boot/!grub_prefix=${media_boot}/!;
+ s!^\s*bootdir=(.*)/boot$!bootdir=$1${media_boot}!;
+ } $local_grub_install;
+ foreach ($master_device, $device) {
+ run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_)
+ or die "unable to run grub on $device\n";
+ }
}
unlink $grub_device_map;
}