diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-09-25 10:24:15 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-09-25 10:24:15 +0000 |
commit | b9f749ec7a1ca5579b1724c92a9549d0a48d1e01 (patch) | |
tree | 4b338f46859f8c656a958e07b3372dad092c51fd | |
parent | 4e66d1d0beed8a9b8c787b2f6d80239888907c33 (diff) | |
download | draklive-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar draklive-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.gz draklive-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.bz2 draklive-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.tar.xz draklive-b9f749ec7a1ca5579b1724c92a9549d0a48d1e01.zip |
do not use custom grub-install for master images
-rwxr-xr-x | draklive | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -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; } |