From bc4ff1b05fdf0f3bb07b070e748e79234989af99 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Fri, 13 May 2011 06:29:49 +0000 Subject: [PATCH] Fixed one issue in lsslp that the CEC name is possible to overwrite one of the FSP name. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9589 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 47 +++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 053daef1c..833eff23b 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -2220,28 +2220,35 @@ sub parse_responses { ########################################### $hostname = undef; $host = "Server-$result[1]-SN$result[2]"; - unless ( exists( $outhash{$host} )) + if ( $type eq SERVICE_BPA ) { - if ( $type eq SERVICE_BPA ) - { - $result[0] = TYPE_FRAME; - } - else - { - $result[0] = TYPE_CEC; - } - # IP of frame and cec should be null - $result[3] = ""; - # side of frame and cec should be null - $result[4] = ""; - push @result, $rsp; - $hostname = gethost_from_url_or_old($host, $result[0], $result[1], $result[2], - $result[3],$result[4], $result[8],$result[5],$result[6]); - if ( $hostname ) - { - $outhash{$hostname} = \@result; - } + $result[0] = TYPE_FRAME; } + else + { + $result[0] = TYPE_CEC; + } + # IP of frame and cec should be null + $result[3] = ""; + # side of frame and cec should be null + $result[4] = ""; + push @result, $rsp; + $hostname = gethost_from_url_or_old($host, $result[0], $result[1], $result[2], + $result[3],$result[4], $result[8],$result[5],$result[6]); + if ( $hostname ) + { + my $newhostname; + if ( exists( $outhash{$hostname} ) ) { + my $tmp = $outhash{$hostname}; + if ( @$tmp[0] ne TYPE_FRAME and @$tmp[0] ne TYPE_CEC ) { + @$tmp[3] =~ /^(A|B)\-/; + $newhostname = $hostname."-".$1; + $outhash{$newhostname} = $tmp; + } + } + $outhash{$hostname} = \@result; + } + } else { ###########################################