summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-30 15:40:54 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-30 15:40:54 +0000
commita579d4de6d28aa2e6e4929cbca436298db5f499d (patch)
treea5122a390915cbc05e39d6082d1b90690c8be9c7
parent9ba356f4bf8d3f538fab80ac3246a9ef8f1b2f5c (diff)
downloaddrakx-backup-do-not-use-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar
drakx-backup-do-not-use-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.gz
drakx-backup-do-not-use-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.bz2
drakx-backup-do-not-use-a579d4de6d28aa2e6e4929cbca436298db5f499d.tar.xz
drakx-backup-do-not-use-a579d4de6d28aa2e6e4929cbca436298db5f499d.zip
do not add again kernels that are already in bootloader config file
-rw-r--r--perl-install/bootloader.pm3
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,
{