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
This commit is contained in:
yinle 2010-11-01 08:59:30 +00:00
parent 13e014c4a1
commit 1dce108090

View File

@ -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/;
}