From 5949e99383a4c92296fa2ffba13ccb442e8f53c5 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 21 Dec 2020 19:17:35 +0000 Subject: Use substInFile instead of sed. --- perl-install/bootloader.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install') 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 { -- cgit v1.2.1