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.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 56fdb0479..096615eaf 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2133,11 +2133,15 @@ sub ensure_pkg_is_installed {
my %pkg = ('grub2' => is_uefi() ? 'grub2-efi' : 'grub2');
my %h = ('grub2' => 'grub2-install');
+ my %suppl = (
+ # method => [ 'pkg_name', 'file_to_test' ],
+ 'grub-graphic' => [ qw(mageia-gfxboot-theme /usr/share/gfxboot/themes/Mageia/boot/message) ],
+ );
my $main_method = main_method($bootloader->{method});
if (member($main_method, qw(grub grub2 lilo))) {
$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;
+ if (my $pkg = $suppl{$bootloader->{method}}) {
+ $do_pkgs->ensure_is_installed(@$pkg, 1) or return 0;
}
}
1;