diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-08 07:19:03 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-09 06:24:57 -0400 |
commit | d05d7d5db81a8cce3d10ea084f0f860a82526991 (patch) | |
tree | 1996ce63c8a458421470f077367c136fe8eaabf0 /perl-install/bootloader.pm | |
parent | d92876fa3cecab53b46a513e22d9a9fc9fb6be02 (diff) | |
download | drakx-d05d7d5db81a8cce3d10ea084f0f860a82526991.tar drakx-d05d7d5db81a8cce3d10ea084f0f860a82526991.tar.gz drakx-d05d7d5db81a8cce3d10ea084f0f860a82526991.tar.bz2 drakx-d05d7d5db81a8cce3d10ea084f0f860a82526991.tar.xz drakx-d05d7d5db81a8cce3d10ea084f0f860a82526991.zip |
generate core.img for UEFI
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 7 |
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)); } |