summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-02-10 23:18:04 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-02-10 23:18:04 +0100
commit7ed7e35e9aa89a7e91b743d632f020f95eaeff58 (patch)
tree9db6c6536bee77d40ccbf490145678279468e98d
parent99f5a321bc495689640ef7cea25cb7850c8dbd70 (diff)
downloaddrakx-7ed7e35e9aa89a7e91b743d632f020f95eaeff58.tar
drakx-7ed7e35e9aa89a7e91b743d632f020f95eaeff58.tar.gz
drakx-7ed7e35e9aa89a7e91b743d632f020f95eaeff58.tar.bz2
drakx-7ed7e35e9aa89a7e91b743d632f020f95eaeff58.tar.xz
drakx-7ed7e35e9aa89a7e91b743d632f020f95eaeff58.zip
prepare for next commit
-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;