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.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index a64b5dc59..dad8719be 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1810,7 +1810,12 @@ sub write_grub2_install_sh {
my ($bootloader, $o_backup_extension) = @_;
my $f = "$::prefix/boot/grub2/install.sh";
my $boot = $bootloader->{boot};
- my @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot;
+ my @options = $boot =~ /\d$/ || is_uefi() ? ('--grub-setup=/bin/true', $boot) : $boot;
+ if (is_uefi()) {
+ my ($dir) = glob("$::prefix/usr/lib/grub/*-efi");
+ $dir =~ s/$::prefix//;
+ push @options, '--directory', $dir;
+ }
renamef($f, $f . ($o_backup_extension || '.old'));
output_with_perm($f, 0755, join(' ', 'grub2-install', @options));
}