summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/bootloader-config
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-15 15:19:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-15 15:19:46 +0000
commit1adffcebcf35045242243bd568d15a19e42e6a9b (patch)
tree327ea71d0b1e1804c175b20304960c6614a789bc /perl-install/standalone/bootloader-config
parent0a3df064c2667c32d167d8ed9a14de2627648a90 (diff)
downloaddrakx-backup-do-not-use-1adffcebcf35045242243bd568d15a19e42e6a9b.tar
drakx-backup-do-not-use-1adffcebcf35045242243bd568d15a19e42e6a9b.tar.gz
drakx-backup-do-not-use-1adffcebcf35045242243bd568d15a19e42e6a9b.tar.bz2
drakx-backup-do-not-use-1adffcebcf35045242243bd568d15a19e42e6a9b.tar.xz
drakx-backup-do-not-use-1adffcebcf35045242243bd568d15a19e42e6a9b.zip
fix borking entry "linux" (removing root=xxx) when removing a kernel
Diffstat (limited to 'perl-install/standalone/bootloader-config')
-rwxr-xr-xperl-install/standalone/bootloader-config11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/standalone/bootloader-config b/perl-install/standalone/bootloader-config
index 5903b0226..5a08d4be3 100755
--- a/perl-install/standalone/bootloader-config
+++ b/perl-install/standalone/bootloader-config
@@ -85,13 +85,13 @@ sub remove_kernel() {
} else {
my $vmlinuz = $_->{kernel_or_dev} && bootloader::expand_vmlinuz_symlink($_->{kernel_or_dev});
if ($vmlinuz && "/boot/$vmlinuz" eq $image) {
+ #- eg: removing kernel XXX and entry "linux" has /boot/vmlinuz -> vmlinuz-XXX
+ #- so finding out which kernel still installed is better suited to use label "linux"
if (!%proposed_labels) {
%proposed_labels = bootloader::get_kernels_and_labels_before_kernel_remove($vmlinuz);
}
- if (my $proposed = $proposed_labels{$_->{label}}) {
- my %to_add = %$_;
- put_in_hash(\%to_add, $proposed);
- push @new_entries, \%to_add;
+ if (my $kernel_str = $proposed_labels{$_->{label}}) {
+ push @new_entries, [ $kernel_str, $_ ];
}
1;
} else {
@@ -105,7 +105,8 @@ sub remove_kernel() {
@{$bootloader->{entries}} = @$to_keep;
foreach (@new_entries) {
- bootloader::add_kernel($bootloader, $_, {});
+ my ($kernel_str, $v) = @$_;
+ bootloader::add_kernel($bootloader, $kernel_str, $v);
}
modify_bootloader();