From cd416951e1096c521d36c1d51f9f98cbcd82e213 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 21 Jul 2011 08:23:52 +0000 Subject: [PATCH] fix bug 3373285:lsslp not find hmc with -i option git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10137 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index be9017276..9546d7ebd 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -1910,14 +1910,22 @@ sub getip_from_iplist my $inc = shift; my @ips = split /,/, $iplist; + my @ips2 = split /,/, $inc; if ( $inc) { for my $net (keys %$nets) { - delete $nets->{$net} if ( $nets->{$net} ne $inc); + my $flag = 1; + for my $einc (@ips2) { + if ( $nets->{$net} eq $einc) { + $flag = 0; + } + } + delete $nets->{$net} if ($flag) ; } } + for my $ip (@ips) { next if ( $ip =~ /:/); #skip IPV6 addresses