summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-12-21 19:17:35 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-12-21 19:17:35 +0000
commit5949e99383a4c92296fa2ffba13ccb442e8f53c5 (patch)
tree4573248a3d91bfdfd129f8dab74234a6b7a1ec1b /perl-install/bootloader.pm
parenta95a0c267fe744529c5de1a1147c63f2e2218801 (diff)
downloaddrakx-5949e99383a4c92296fa2ffba13ccb442e8f53c5.tar
drakx-5949e99383a4c92296fa2ffba13ccb442e8f53c5.tar.gz
drakx-5949e99383a4c92296fa2ffba13ccb442e8f53c5.tar.bz2
drakx-5949e99383a4c92296fa2ffba13ccb442e8f53c5.tar.xz
drakx-5949e99383a4c92296fa2ffba13ccb442e8f53c5.zip
Use substInFile instead of sed.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 85278c547..4a0e1a4bc 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2507,8 +2507,8 @@ sub install_refind {
sub set_refind_use_nvram {
my ($use_nvram, $path) = @_;
return if ! -w $path;
- my $script = 's/^#?\s*use_nvram\s+.*/use_nvram ' . ($use_nvram ? 'true' : 'false') . '/';
- run_program::run('sed', '-i', '-E', $script, $path) or die "failed to update $path";
+ my $setting = $use_nvram ? 'true' : 'false';
+ substInFile { s/^#?\s*use_nvram\s+.*/use_nvram $setting/ } $path;
}
sub when_config_changed_refind {