summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/devices.pm5
-rw-r--r--perl-install/partition_table.pm2
4 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index c85825528..83b8358d3 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,9 @@ Version 11.44 - 16 September 2008
- bootloader-config:
o --action migrate-to-uuids: add UUID to swap v.2 in case the swap was
created long ago when mkswap didn't do it by default
+ o fix reading existing grub conf in present of /dev/mapper/xxxx0p1
+ partitions (which was causing bootloader-config to drop correct entries,
+ cf #37722)
Version 11.43 - 16 September 2008
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 1939401c3..cb0839598 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1551,7 +1551,7 @@ sub grub2dev_and_file {
my ($hd, $part, $rel_file) = parse_grub_file($grub_file) or return;
$grub2dev->{$hd} or internal_error("$hd has no mapping in device.map (when translating $grub_file)");
$part = $o_block_device ? '' : defined $part && $part + 1; #- grub wants "(hdX,Y)" where lilo just want "hdY+1"
- my $device = '/dev/' . $grub2dev->{$hd} . $part;
+ my $device = '/dev/' . devices::prefix_for_dev($grub2dev->{$hd}) . $part;
$device, $rel_file;
}
sub grub2dev {
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 197127cd0..9ee3d6ac5 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -203,6 +203,11 @@ sub part_prefix {
(simple_partition_scan($part))[0];
}
+sub prefix_for_dev {
+ my ($dev) = @_;
+ $dev . ($dev =~ /\d$/ ? 'p' : '');
+}
+
sub symlink_now_and_register {
my ($if_struct, $of) = @_;
my $if = $if_struct->{device};
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 6890b466d..d26a14e31 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -85,7 +85,7 @@ sub compute_device_name {
sub _compute_device_name {
my ($hd, $nb) = @_;
- my $prefix = $hd->{prefix} || $hd->{device} . ($hd->{device} =~ /\d$/ ? 'p' : '');
+ my $prefix = $hd->{prefix} || devices::prefix_for_dev($hd->{device});
$prefix . $nb;
}