summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/bootloader.pm15
2 files changed, 14 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 95672c024..912997302 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,7 @@
+- bootloader-config:
+ o fix handling xen kernels: it should not replace an existing 'linux'
+ entry (#40865)
+
Version 10.29.8 - 01 August 2008
- drakupdate_fstab: make sure removable disks are not fs-checked on boot
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index c85a9271b..2988d3e20 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -50,6 +50,11 @@ sub vmlinuz2kernel_str {
};
}
+sub kernel_str2short_name {
+ my ($kernel) = @_;
+ $kernel->{ext} =~ /^xen/ ? 'xen' : $kernel->{basename};
+}
+
sub basename2initrd_basename {
my ($basename) = @_;
$basename =~ s!vmlinuz-?!!; #- here we do not use $vmlinuz_regexp since we explictly want to keep all that is not "vmlinuz"
@@ -61,14 +66,14 @@ sub kernel_str2vmlinuz_long {
}
sub kernel_str2initrd_long {
my ($kernel) = @_;
- basename2initrd_basename($kernel->{basename}) . '-' . $kernel->{version} . '.img';
+ basename2initrd_basename(kernel_str2short_name($kernel)) . '-' . $kernel->{version} . '.img';
}
sub kernel_str2vmlinuz_short {
my ($kernel) = @_;
if ($kernel->{use_long_name}) {
kernel_str2vmlinuz_long($kernel);
} else {
- $kernel->{basename};
+ kernel_str2short_name($kernel);
}
}
sub kernel_str2initrd_short {
@@ -76,7 +81,7 @@ sub kernel_str2initrd_short {
if ($kernel->{use_long_name}) {
kernel_str2initrd_long($kernel);
} else {
- basename2initrd_basename($kernel->{basename}) . '.img';
+ basename2initrd_basename(kernel_str2short_name($kernel)) . '.img';
}
}
@@ -85,8 +90,8 @@ sub kernel_str2label {
if ($o_use_long_name || $kernel->{use_long_name}) {
_sanitize_ver($kernel);
} else {
- $kernel->{basename} eq 'vmlinuz' ? ($kernel->{ext} eq 'xen' ? $kernel->{ext} : 'linux') :
- $kernel->{basename};
+ my $short_name = kernel_str2short_name($kernel);
+ $short_name eq 'vmlinuz' ? 'linux' : $short_name;
}
}