diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-10-24 21:07:25 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-10-24 21:07:25 +0100 |
commit | 325cbdb1eeff9310c305bfb4c29bf7f03556655f (patch) | |
tree | e6e923d3e91ee5925227efc9ad78bf41b99d8431 /perl-install/bootloader.pm | |
parent | b6ebfb5bc19b5c6c51ade25d8f8c83fe926cbf5a (diff) | |
download | drakx-325cbdb1eeff9310c305bfb4c29bf7f03556655f.tar drakx-325cbdb1eeff9310c305bfb4c29bf7f03556655f.tar.gz drakx-325cbdb1eeff9310c305bfb4c29bf7f03556655f.tar.bz2 drakx-325cbdb1eeff9310c305bfb4c29bf7f03556655f.tar.xz drakx-325cbdb1eeff9310c305bfb4c29bf7f03556655f.zip |
Factor out code to mount the efivarfs pseudo-filesystem.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 4 |
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)) { |