summaryrefslogtreecommitdiffstats
path: root/perl-install/lvm.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-19 04:53:20 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-01-02 14:57:26 +0100
commite65b0f43c538bfc9097d92669c4706cab8828692 (patch)
treec6b7bdfdfb7d4ed8bd064e972b0af8c4543e3b4b /perl-install/lvm.pm
parent8b2d9993f22e0f3facdc1ebca58d5af2e1d79406 (diff)
downloaddrakx-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
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r--perl-install/lvm.pm4
1 files changed, 2 insertions, 2 deletions
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 {