diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-05-19 04:53:20 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-01-02 14:57:26 +0100 |
commit | e65b0f43c538bfc9097d92669c4706cab8828692 (patch) | |
tree | c6b7bdfdfb7d4ed8bd064e972b0af8c4543e3b4b | |
parent | 8b2d9993f22e0f3facdc1ebca58d5af2e1d79406 (diff) | |
download | drakx-e65b0f43c538bfc9097d92669c4706cab8828692.tar drakx-e65b0f43c538bfc9097d92669c4706cab8828692.tar.gz drakx-e65b0f43c538bfc9097d92669c4706cab8828692.tar.bz2 drakx-e65b0f43c538bfc9097d92669c4706cab8828692.tar.xz drakx-e65b0f43c538bfc9097d92669c4706cab8828692.zip |
suggest "lv_foo" instead of just "foo" for LVname
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/lvm.pm | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 42a193ef8..13a0176da 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,6 @@ - misc cleanups +- diskdrake: + o suggest "lv_foo" instead of just "foo" for LVname - drakboot: o skip swap in the list of partitions (mga#15767) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 78b7861b7..1e645c2e2 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,7 @@ - bootloader: o skip swap in the list of partitions (mga#15767) +- partitioning: + o suggest "lv_foo" instead of just "foo" for LVname - fix a message (mga#51414) - misc cleanups diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index bace3e3ba..f48f2970e 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -226,14 +226,14 @@ sub suggest_lv_name_from_mnt_point { $str = "root" if $str eq '/'; $str =~ s!^/!!; $str =~ s!/!_!g; - $str; + 'lv_' . $str; } sub suggest_lv_name { my ($lvm, $lv) = @_; my $list = $lvm->{primary}{normal} ||= []; $lv->{lv_name} ||= suggest_lv_name_from_mnt_point($lv); - $lv->{lv_name} ||= 1 + max(map { if_($_->{device} =~ /(\d+)$/, $1) } @$list); + $lv->{lv_name} ||= "lv_" . (1 + max(map { if_($_->{device} =~ /(\d+)$/, $1) } @$list)); } sub lv_create { |