summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-03-24 10:52:42 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-03-25 08:05:39 +0100
commite540363478de809a2a9769c5794b3adab60b63eb (patch)
treeefa8ee21b4523216578ad3d7540cdde233075acc /perl-install/bootloader.pm
parent55bc7ba0df2271059a114c6621c429ff96c44149 (diff)
downloaddrakx-e540363478de809a2a9769c5794b3adab60b63eb.tar
drakx-e540363478de809a2a9769c5794b3adab60b63eb.tar.gz
drakx-e540363478de809a2a9769c5794b3adab60b63eb.tar.bz2
drakx-e540363478de809a2a9769c5794b3adab60b63eb.tar.xz
drakx-e540363478de809a2a9769c5794b3adab60b63eb.zip
simplify
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm14
1 files changed, 4 insertions, 10 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 5d6714b0e..e7b6eab5d 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2500,16 +2500,10 @@ sub ensure_pkg_is_installed {
if ($main_method eq 'grub2') {
my ($prefix, $pkg);
if (is_uefi()) {
- if (uefi_type() eq 'ia32') {
- $prefix = 'i386-efi';
- $pkg = 'grub2-efi(x86-32)';
- } elsif (uefi_type() eq 'aa64') {
- $prefix = 'arm64-efi';
- $pkg = 'grub2-efi(aarch-64)';
- } else {
- $prefix = 'x86_64-efi';
- $pkg = 'grub2-efi(x86-64)';
- }
+ my %convert = (ia32 => 'i386', aa64 => 'arm64', x86 => 'x86_64');
+ my %pkgs = (ia32 => 'x86-32', aa64 => 'aarch-64', x86 => 'x86-64');
+ $prefix = $convert{uefi_type()} . "-efi";
+ $pkg = "grub2-efi(" . $pkgs{uefi_type()} . ")";
} else {
$prefix = 'i386-pc';
$pkg = 'grub2';