diff options
-rw-r--r-- | perl-install/bootloader.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index ea9096264..f3fe2cd59 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -131,14 +131,11 @@ sub add_entry($$) { foreach (@$entries) { if ($_->{label} eq $v->{label}) { - if (compare_entries($_, $v)) { - $_->{label} = "old${freeold}_$_->{label}"; - } else { - $v = undef; #- avoid inserting it twice as another entry already exists ! - } + compare_entries($_, $v) or return; #- avoid inserting it twice as another entry already exists ! + $_->{label} = "old${freeold}_$_->{label}"; } } - $v and push @$entries, $v; + push @$entries, $v; } sub add_kernel($$$$$) { |