From: Wei Liu Subject: [PATCH OSSTEST v2 06/11] Cope with Jessie's d-i vg name Date: Mon, 15 Jun 2015 14:36:34 +0100 Message-ID: <1434375399-19107-7-git-send-email-wei.liu2@citrix.com> References: <1434375399-19107-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z4UZa-0000f7-NO for xen-devel@lists.xenproject.org; Mon, 15 Jun 2015 13:37:10 +0000 In-Reply-To: <1434375399-19107-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: ian.jackson@eu.citrix.com, Wei Liu , ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org In Jessie the default vg name is changed to "$hostname-vg". Make that default case and check for wheezy, squeeze and lenny for backward compatibility. Signed-off-by: Wei Liu --- Changes in v2: 1. Make Jessie case default. --- ts-host-install | 7 +++++-- ts-xen-build-prep | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ts-host-install b/ts-host-install index 242bfb0..50b39a0 100755 --- a/ts-host-install +++ b/ts-host-install @@ -87,10 +87,13 @@ END await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho); - our $vgname= $ho->{Name}; + our $vgname= $ho->{Suite} =~ m/wheezy|squeeze/ + ? $ho->{Name} + : $ho->{Suite} =~ m/lenny/ + ? "$ho->{Name}.$c{TestHostDomain}" + : "$ho->{Name}-vg"; if ($ho->{Suite} =~ m/lenny/) { - $vgname .= ".$c{TestHostDomain}"; target_editfile_root($ho, '/boot/grub/menu.lst', sub { while () { s/^terminal.*/terminal --timeout=10 serial console/; diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 4dece65..befb7d4 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -53,9 +53,11 @@ sub overall_limit_pe ($) { sub determine_vg_lv () { $vg= - $ho->{Suite} =~ m/lenny/ - ? "$ho->{Name}.$c{TestHostDomain}" - : $ho->{Name}; + $ho->{Suite} =~ m/wheezy|squeeze/ + ? $ho->{Name} + : $ho->{Suite} =~ m/lenny/ + ? "$ho->{Name}.$c{TestHostDomain}" + : "$ho->{Name}-vg"; $lv = "/dev/$vg/$lvleaf"; } -- 1.9.1