From 1dce1080900b4e7e98fc463d3a8dc6c47c3d5bff Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 1 Nov 2010 08:59:30 +0000 Subject: [PATCH] Fix the defect 3096172, modified the order of analysis lhea_adapter logical port. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7987 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCvm.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/PPCvm.pm b/perl-xCAT/xCAT/PPCvm.pm index 5c57552b0..39af9161d 100644 --- a/perl-xCAT/xCAT/PPCvm.pm +++ b/perl-xCAT/xCAT/PPCvm.pm @@ -1506,12 +1506,18 @@ sub lhea_adapter { $cfgdata =~ /lhea_logical_ports=([^$delim]+)|$/; my @lhea = split ",", $1; - foreach ( @lhea ) { - if ( /(\w+)\/(\w+)$/ ) { - my $id = ($1 =~ /(\d+)/) ? $1+1 : $1; - s/(\w+)\/(\w+)$/$id\/$2/; + foreach ( @lhea ) + { + if ( /^(\d+)\/(\d+)\/(\d+)\/(\d+)/) + { + my $id = $4; + if($id =~ /\d+/) + { + $id = $id + 1; + } + s/^(\d+)\/(\d+)\/(\d+)\/(\d+)/$1\/$2\/$3\/$id/; } - } + } my $adapters = "lhea_logical_ports=".join( ",", @lhea ); $cfgdata =~ s/lhea_logical_ports=[^$delim]+/$adapters/; }