From b47526d4ab8204a928309b2f7a0cfbbb244b7195 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 12 Oct 2018 19:17:47 +0100 Subject: drakboot: minor fixes to reading/writing rEFInd config files Fixes a couple of issues found when reading a manually generated file: - allow for extra white space between label and append options - don't simplify the label when writing - rEFInd allows any text string here --- perl-install/NEWS | 4 ++++ perl-install/bootloader.pm | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 2fb67d204..24f06b363 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,7 @@ +- drakboot: + o handle extra white space when reading rEFInd config file + o don't simplify label when writing rEFInd config file + Version 18.2 - 5 Oct 2018 - drakboot: diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 947ef4f77..fd2f85169 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -645,7 +645,7 @@ sub read_refind() { my %bootloader = (entries => []); foreach (cat_utf8("$::prefix/boot/refind_linux.conf")) { next if /^#/; - my ($label, $append) = /"(.*)"\s"(.*)"/; + my ($label, $append) = /"(.*)"\s*"(.*)"/; my $root = $1 if $append =~ s/root=(\S*)\s*//; my $vga = $1 if $append =~ s/vga=(\S*)\s*//; if ($label && $root) { @@ -2341,7 +2341,7 @@ sub write_refind { if_($entry->{'read-write'}, 'rw'), if_($vga && $vga ne "normal", "vga=$vga") ); - push @config, '"' . simplify_label($entry->{label}) . '" "' . $boot_params . '"'; + push @config, '"' . $entry->{label} . '" "' . $boot_params . '"'; } } if (@config) { -- cgit v1.2.1