From a4f4df9ed6cacbdcc82dbd1b0e7d7934c7f7af29 Mon Sep 17 00:00:00 2001 From: otubo Date: Fri, 12 Aug 2011 03:08:14 +0000 Subject: [PATCH] Solving bug #3390338 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10275 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCscan.pm | 44 +++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/perl-xCAT/xCAT/PPCscan.pm b/perl-xCAT/xCAT/PPCscan.pm index 1284e84a6..6ff254945 100644 --- a/perl-xCAT/xCAT/PPCscan.pm +++ b/perl-xCAT/xCAT/PPCscan.pm @@ -177,28 +177,30 @@ sub enumerate { ######################################### # Save hardware connections ######################################### - $filter = "type_model_serial_num,ipaddr,sp,side"; - my $conns = xCAT::PPCcli::lssysconn( $exp, "alls", $filter ); - $Rc = shift(@$conns); + if ( $hwtype ne "ivm" ) { #Not applicable for IVM + $filter = "type_model_serial_num,ipaddr,sp,side"; + my $conns = xCAT::PPCcli::lssysconn( $exp, "alls", $filter ); + $Rc = shift(@$conns); - ######################################### - # Return error - ######################################### - if ( $Rc != SUCCESS ) { - return( @$conns[0] ); - } - - foreach my $con ( @$conns ) { - my ($mtms,$ipaddr,$sp,$side) = split /,/,$con; - my $value = undef; - - if ( $sp =~ /^primary$/ or $side =~ /^a$/ ) { - $value = "A"; - } elsif ($sp =~ /^secondary$/ or $side =~ /^b$/ ) { - $value = "B"; + ######################################### + # Return error + ######################################### + if ( $Rc != SUCCESS ) { + return( @$conns[0] ); } - $hwconn{$ipaddr} = "$mtms,$value"; + foreach my $con ( @$conns ) { + my ($mtms,$ipaddr,$sp,$side) = split /,/,$con; + my $value = undef; + + if ( $sp =~ /^primary$/ or $side =~ /^a$/ ) { + $value = "A"; + } elsif ($sp =~ /^secondary$/ or $side =~ /^b$/ ) { + $value = "B"; + } + + $hwconn{$ipaddr} = "$mtms,$value"; + } } ######################################### @@ -332,7 +334,9 @@ sub enumerate { } my $mtmss = $hwconn{$ips}; - my ($mtms,$side) = split /,/, $mtmss; + if ( $hwtype ne "ivm" ) { #Not applicable for IVM + my ($mtms,$side) = split /,/, $mtmss; + } push @values, join( ",", "cec",$fsp,$cageid,$model,$serial,"",$server,$prof,$fname,"" );