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, 3 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index ebfc89fb2..ad0b5544c 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1810,11 +1810,10 @@ 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$/ || is_uefi() ? ('--grub-setup=/bin/true', $boot) : $boot;
+ my @options;
if (is_uefi()) {
- my ($dir) = glob("$::prefix/usr/lib/grub/*-efi");
- $dir =~ s/$::prefix//;
- push @options, '--directory', $dir;
+ } else {
+ @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot;
}
renamef($f, $f . ($o_backup_extension || '.old'));
output_with_perm($f, 0755, join(' ', 'grub2-install', @options));