summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-26 21:28:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-26 21:28:18 +0000
commit7737609fd353e5e3cfba4550aead7bb5dcbebe85 (patch)
treed849247b59e9ed4bd9c8adc4332d8e41f9082998 /perl-install/bootloader.pm
parent2bf3cbaa2ecb5917ca9853f09bbabd334852d499 (diff)
downloaddrakx-backup-do-not-use-7737609fd353e5e3cfba4550aead7bb5dcbebe85.tar
drakx-backup-do-not-use-7737609fd353e5e3cfba4550aead7bb5dcbebe85.tar.gz
drakx-backup-do-not-use-7737609fd353e5e3cfba4550aead7bb5dcbebe85.tar.bz2
drakx-backup-do-not-use-7737609fd353e5e3cfba4550aead7bb5dcbebe85.tar.xz
drakx-backup-do-not-use-7737609fd353e5e3cfba4550aead7bb5dcbebe85.zip
correctly handle empty and commented lines in lilo.conf
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm3
1 files changed, 2 insertions, 1 deletions
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/) {