diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-30 15:40:54 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-30 15:40:54 +0000 |
commit | a579d4de6d28aa2e6e4929cbca436298db5f499d (patch) | |
tree | a5122a390915cbc05e39d6082d1b90690c8be9c7 /perl-install/bootloader.pm | |
parent | 9ba356f4bf8d3f538fab80ac3246a9ef8f1b2f5c (diff) | |
download | drakx-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar drakx-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.gz drakx-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.bz2 drakx-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.xz drakx-a579d4de6d28aa2e6e4929cbca436298db5f499d.zip |
do not add again kernels that are already in bootloader config file
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 23dcbc097..845ea6758 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1038,6 +1038,9 @@ sub suggest { my @kernels = get_kernels_and_labels() or die "no kernel installed"; + my %old_kernels = map { vmlinuz2version($_->{kernel_or_dev}) => 1 } @{$bootloader->{entries}}; + @kernels = grep { !$old_kernels{$_->{version}} } @kernels; + foreach my $kernel (@kernels) { my $e = add_kernel($bootloader, $kernel, { |