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.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 44376db2b..50b676fc0 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2471,9 +2471,7 @@ sub write_refind {
sub write_refind_previous_boot_var {
my ($kernel) = @_;
- my $efivars = '/sys/firmware/efi/efivars';
- my $already_mounted = cat_('/proc/mounts') =~ /$efivars/;
- run_program::run('mount', '-t', 'efivarfs', 'none', $efivars) if !$already_mounted;
+ my ($efivars, $already_mounted) = mount_efivars();
my $previous_boot = "$efivars/PreviousBoot-36d08fa7-cf0b-42f5-8f14-68df73ed3740";
run_program::run('chattr', '-i', $previous_boot) if -e $previous_boot;
if (open(my $efivar, '>:raw', $previous_boot)) {