summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-17 10:27:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-17 10:27:42 +0000
commit0ba55bb1251279fc006d58453ab0d2c902f8af36 (patch)
tree39df719ec59d0287e2510975e9c6e0a7fd7e09cb
parent2f1c9b23b78304cafcc3975e28e837394d0eab41 (diff)
downloaddrakx-backup-do-not-use-0ba55bb1251279fc006d58453ab0d2c902f8af36.tar
drakx-backup-do-not-use-0ba55bb1251279fc006d58453ab0d2c902f8af36.tar.gz
drakx-backup-do-not-use-0ba55bb1251279fc006d58453ab0d2c902f8af36.tar.bz2
drakx-backup-do-not-use-0ba55bb1251279fc006d58453ab0d2c902f8af36.tar.xz
drakx-backup-do-not-use-0ba55bb1251279fc006d58453ab0d2c902f8af36.zip
remove bad entries after reading existing conf file
-rw-r--r--perl-install/bootloader.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 02dfa54b7..bee4824c4 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -199,9 +199,11 @@ sub read_lilo {
delete $b{message};
}
- #- cleanup duplicate labels (in case file is corrupted)
+ #- cleanup duplicate labels & bad entries (in case file is corrupted)
my %seen;
- @{$b{entries}} = grep { !$seen{$_->{label}}++ } @{$b{entries}};
+ @{$b{entries}} =
+ grep { !$seen{$_->{label}}++ }
+ grep { $_->{type} ne 'image' || -e "$::prefix$_->{kernel_or_dev}" } @{$b{entries}};
\%b;
}