summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-10-25 18:46:55 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-10-25 18:46:55 +0100
commit1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14 (patch)
tree6a1989f725dcacfbd325b954b5e4c2e1b23b0234 /perl-install
parent4db36433bd629747578ba1e60aff425066dac140 (diff)
downloaddrakx-1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14.tar
drakx-1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14.tar.gz
drakx-1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14.tar.bz2
drakx-1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14.tar.xz
drakx-1d1d49e4f422e6e5ef8204b6cdcca8fd8cdf5f14.zip
Ensure efivarfs is mounted in the chroot when running the installer.
If the efivarfs was already mounted in the installer runtime environment, the previous code would detect that and not mount it in the installed system enviroment. Currently this doesn't happen unless the user manually mounts it, but protect against that and against future changes.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 5985c7181..508e6b31f 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -765,10 +765,10 @@ and returns the mount point and whether it was already mounted.
=cut
sub mount_efivars {
- my $mount_point = '/sys/firmware/efi/efivars';
- my $already_mounted = cat_("$::prefix/proc/mounts") =~ /$mount_point/;
- run_program::run('mount', '-t', 'efivarfs', 'none', "$::prefix$mount_point") if !$already_mounted;
- ("$::prefix$mount_point", $already_mounted);
+ my $mount_point = "$::prefix/sys/firmware/efi/efivars";
+ my $already_mounted = cat_("$::prefix/proc/mounts") =~ /\s$mount_point\s/;
+ run_program::run('mount', '-t', 'efivarfs', 'none', $mount_point) if !$already_mounted;
+ ($mount_point, $already_mounted);
}
=item cmp_kernel_versions($va, $vb)