diff options
-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; } |