summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {