diff options
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 446df0ade..24be5d821 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2144,7 +2144,6 @@ sub install { sub ensure_pkg_is_installed { my ($do_pkgs, $bootloader) = @_; - my %pkg = ('grub2' => is_uefi() ? 'grub2-efi' : 'grub2'); my %suppl = ( # method => [ 'pkg_name', 'file_to_test' ], 'grub-graphic' => [ qw(mageia-gfxboot-theme /usr/share/gfxboot/themes/Mageia/boot/message) ], @@ -2152,7 +2151,9 @@ sub ensure_pkg_is_installed { ); my $main_method = main_method($bootloader->{method}); if ($main_method eq 'grub2') { - $do_pkgs->ensure_binary_is_installed($pkg{grub2}, 'grub2-install', 1) or return 0; + my $pkg = is_uefi() ? 'grub2-efi' : 'grub2'; + my $prefix = is_uefi() ? 'efi' : 'pc'; + $do_pkgs->ensure_is_installed($pkg, glob("/usr/lib/grub/*-$prefix/ext2.mod"), 1) or return 0; } elsif (member($main_method, qw(grub grub2 lilo))) { $do_pkgs->ensure_binary_is_installed($main_method, $main_method, 1) or return 0; } |