diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-16 16:48:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-16 16:48:06 +0000 |
commit | 7d79e26663b72c39887dbb3ab12bcf84ba283842 (patch) | |
tree | 3150653522ef25d480a491e8bca38b6fc75313e4 /perl-install | |
parent | 17641541c50681eee3614343f6dd3121a2a5400b (diff) | |
download | drakx-7d79e26663b72c39887dbb3ab12bcf84ba283842.tar drakx-7d79e26663b72c39887dbb3ab12bcf84ba283842.tar.gz drakx-7d79e26663b72c39887dbb3ab12bcf84ba283842.tar.bz2 drakx-7d79e26663b72c39887dbb3ab12bcf84ba283842.tar.xz drakx-7d79e26663b72c39887dbb3ab12bcf84ba283842.zip |
- bootloader-config:
o fix reading existing grub conf in present of /dev/mapper/xxxx0p1
partitions (which was causing bootloader-config to drop correct entries,
cf #37722)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 2 | ||||
-rw-r--r-- | perl-install/devices.pm | 5 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 2 |
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; } |