From 7737609fd353e5e3cfba4550aead7bb5dcbebe85 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 26 Aug 2002 21:28:18 +0000 Subject: correctly handle empty and commented lines in lilo.conf --- perl-install/bootloader.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 7ad0650ae..feac63642 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -82,7 +82,8 @@ sub read() { my ($e, $v, $f); my %b; foreach (cat_("$::prefix$file")) { - ($_, $v) = /^\s*(.*?)\s*(?:=\s*(.*?))?\s*$/; + next if /^\s*#/ || /^\s*$/; + ($_, $v) = /^\s*(\S+)\s*(?:=\s*(.*?))?\s*$/ or log::l("unknown line in lilo.conf: $_"), next; if (/^(image|other)$/) { if (arch() =~ /ppc/) { -- cgit v1.2.1