summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 7c372da27..360f20c0f 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2085,10 +2085,11 @@ sub install {
sub ensure_pkg_is_installed {
my ($do_pkgs, $bootloader) = @_;
+ my %pkg = ('grub2' => glob_("/sys/firmware/efi/*") ? 'grub2-efi' : 'grub2');
my %h = ('grub2' => 'grub2-install');
my $main_method = main_method($bootloader->{method});
if (member($main_method, qw(grub grub2 lilo))) {
- $do_pkgs->ensure_binary_is_installed($main_method, $h{$main_method} || $main_method, 1) or return 0;
+ $do_pkgs->ensure_binary_is_installed($pkg{$main_method} || $main_method, $h{$main_method} || $main_method, 1) or return 0;
if ($bootloader->{method} eq 'grub-graphic') {
$do_pkgs->ensure_is_installed('mageia-gfxboot-theme', '/usr/share/gfxboot/themes/Mageia/boot/message', 1) or return 0;
}