From e65b0f43c538bfc9097d92669c4706cab8828692 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 19 May 2015 04:53:20 -0400 Subject: suggest "lv_foo" instead of just "foo" for LVname --- perl-install/NEWS | 2 ++ perl-install/install/NEWS | 2 ++ 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 { -- cgit v1.2.1