From 06c22411b41877d731325a36971feeeccf71d53b Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 16 Jul 2012 16:16:33 +0000 Subject: [PATCH] fix defect 3544651 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13300 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 25910a796..fe0b66681 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -121,6 +121,7 @@ sub makescript my ($master, $ps, $os, $arch, $profile); my $noderestab = xCAT::Table->new('noderes'); + my $nodelisttab = xCAT::Table->new('nodelist'); my $typetab = xCAT::Table->new('nodetype'); my $posttab = xCAT::Table->new('postscripts'); my $ostab = xCAT::Table->new('osimage'); @@ -128,10 +129,10 @@ sub makescript my %rsp; my $rsp; my $master; - unless ($noderestab and $typetab and $posttab) + unless ($noderestab and $typetab and $posttab and $nodelisttab) { push @{$rsp->{data}}, - "Unable to open site or noderes or nodetype or postscripts table"; + "Unable to open site or noderes or nodetype or postscripts or nodelist table"; xCAT::MsgUtils->message("E", $rsp, $callback); return undef; @@ -186,7 +187,13 @@ sub makescript } # end site table attributes - # read the sshbetweennodes attribute and process + # read the nodes groups + my $groups= + $nodelisttab->getNodeAttribs($node, ['groups']); + + push @scriptd, "GROUPS=$groups->{groups}\n"; + push @scriptd, "export GROUPS\n"; + # read the sshbetweennodes attribute and process my $enablessh=xCAT::Utils->enablessh($node); if ($enablessh == 1) { push @scriptd, "ENABLESSHBETWEENNODES=YES\n";