summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-04 03:42:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-04 03:42:16 +0000
commitbdbd3728bd271236fa91d689430e164a63063b84 (patch)
tree39f3bc0eb1b513eb04e8872180816568e21b4f89 /perl-install/bootloader.pm
parent224fd017f19ea3da1efb999bc5d68b70ae07c4c3 (diff)
downloaddrakx-backup-do-not-use-bdbd3728bd271236fa91d689430e164a63063b84.tar
drakx-backup-do-not-use-bdbd3728bd271236fa91d689430e164a63063b84.tar.gz
drakx-backup-do-not-use-bdbd3728bd271236fa91d689430e164a63063b84.tar.bz2
drakx-backup-do-not-use-bdbd3728bd271236fa91d689430e164a63063b84.tar.xz
drakx-backup-do-not-use-bdbd3728bd271236fa91d689430e164a63063b84.zip
- same_entries() doesn't look anymore at kernel options
(it tends to create stupid alt_xxx entries) - fix creation of labels alt2_alt_xxx (will now be alt2_xxx) - don't create bad "linux-nonfb" for kernel-win4lin
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 56cb73d9a..e31249d9a 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -317,7 +317,7 @@ sub same_entries {
if ($_ eq 'label') {
next;
} elsif ($_ eq 'append') {
- next if join(' ', sort split(' ', $a->{$_})) eq join(' ', sort split(' ', $b->{$_}))
+ next;
} else {
next if $a->{$_} eq $b->{$_};
@@ -356,7 +356,10 @@ sub add_entry {
$to_add = $conflicting;
my $new_label = $v->{label} eq 'linux' && kernel_str2label(vmlinuz2kernel_str($to_add->{kernel_or_dev}), 'use_long_name');
- $label = $new_label && $label ne $new_label ? $new_label : 'alt' . ($i++ ? $i : '') . "_$label";
+ $label = $new_label && $label ne $new_label ? $new_label : do {
+ $label =~ s/^alt\d*_//;
+ 'alt' . ($i++ ? $i : '') . "_$label";
+ };
}
die 'add_entry';
}
@@ -675,14 +678,14 @@ wait for default boot.
my @kernels = get_kernels_and_labels() or die "no kernel installed";
foreach my $kernel (@kernels) {
- add_kernel($bootloader, $kernel,
+ my $e = add_kernel($bootloader, $kernel,
{
root => $root,
if_($options{vga_fb} && $kernel->{ext} eq '', vga => $options{vga_fb}), #- using framebuffer
if_($options{vga_fb} && $options{quiet}, append => "splash=silent"),
});
- if ($options{vga_fb} && $kernel->{ext} eq '') {
+ if ($options{vga_fb} && $e->{label} eq 'linux') {
add_kernel($bootloader, $kernel, { root => $root, label => 'linux-nonfb' });
}
}