summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}