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.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';