From b5765f2fcfc0c534ce713d82cc7d7577959ae484 Mon Sep 17 00:00:00 2001 From: jjhua Date: Wed, 26 Jun 2013 06:59:36 +0000 Subject: [PATCH] defect 3605. correct the nodesetstate value. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16758 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index ce3295910..c3af718cb 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -407,7 +407,7 @@ sub makescript { #print "nodesetstate:$nodesetstate\n"; ## OSPKGDIR export # for #OSIMAGE_VARS_EXPORT# - if (!$nodesetstate) { $nodesetstate = $nodes_setstate_hash->{$node}; } + if (!$nodesetstate || ( defined($nodes_setstate_hash) && $nodes_setstate_hash->{$node}) ) { $nodesetstate = $nodes_setstate_hash->{$node}; } #print "nodesetstate:$nodesetstate\n"; #my $et = $typehash->{$node}; @@ -1430,7 +1430,8 @@ sub getNodesSetState my ($ret, $msg)=xCAT::SvrUtils->getNodesetStates($nodes, $nsh); foreach my $state (keys %$nsh) { my $ns = $nsh->{$state}; - %res = map {$_ => $state} @$ns; + my %result = map {$_ => $state} @$ns; + %res = (%result, %res); } return \%res; }