diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-10-12 19:17:47 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-10-12 19:17:47 +0100 |
commit | b47526d4ab8204a928309b2f7a0cfbbb244b7195 (patch) | |
tree | 99a63cd09b6712da5416d7ba0b15a0409938c94a | |
parent | 66c13cd85c267e7958127b47e301962d7f97f357 (diff) | |
download | drakx-b47526d4ab8204a928309b2f7a0cfbbb244b7195.tar drakx-b47526d4ab8204a928309b2f7a0cfbbb244b7195.tar.gz drakx-b47526d4ab8204a928309b2f7a0cfbbb244b7195.tar.bz2 drakx-b47526d4ab8204a928309b2f7a0cfbbb244b7195.tar.xz drakx-b47526d4ab8204a928309b2f7a0cfbbb244b7195.zip |
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
-rw-r--r-- | perl-install/NEWS | 4 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 4 |
2 files changed, 6 insertions, 2 deletions
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) { |