From c9eb5ee182d8cec12c9b17aa85dcac72bacf4b5f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 31 May 2016 19:14:21 +0200 Subject: introduce get_grub2_install_sh() (needed for next commit) --- perl-install/bootloader.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 0d8a7c243..247125b28 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -329,7 +329,7 @@ sub read_grub2() { } sub read_grub2_install_sh() { - my $s = cat_("$::prefix/boot/grub2/install.sh"); + my $s = cat_(get_grub2_install_sh()); my %h; if ($s =~ m!(/dev/\S+)!m) { $h{boot} = $1; @@ -1830,9 +1830,13 @@ sub write_grub2 { write_grub2_install_sh($bootloader, $o_backup_extension); } +sub get_grub2_install_sh() { + "$::prefix/boot/grub2/install.sh"; +} + sub write_grub2_install_sh { my ($bootloader, $o_backup_extension) = @_; - my $f = "$::prefix/boot/grub2/install.sh"; + my $f = get_grub2_install_sh(); my $boot = $bootloader->{boot}; my @options; if (is_uefi()) { -- cgit v1.2.1