To support site.precreatemypostscripts=1

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13995 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2012-10-12 07:15:19 +00:00
parent caa1483714
commit 8be6104a56

View File

@ -709,6 +709,7 @@ sub subvars_for_mypostscript {
my $masterhash = getMasters($nodes);
## nfsserver,installnic,primarynic
my $attribsfromnoderes = getNoderes($nodes);
@ -740,8 +741,10 @@ sub subvars_for_mypostscript {
$allattribsfromsitetable =~ s/MASTER=([^\n]+)\n/MASTER=$master\n/;
}
# ENABLESSHBETWEENNODES
#get the node type, service node or compute node
my $nodetype = getNodeType($node);
## nfsserver,installnic,primarynic
my ($nfsserver, $installnic, $primarynic, $route_vars);
@ -866,6 +869,7 @@ sub subvars_for_mypostscript {
$inc =~ s/#COMMAND:([^#]+)#/command($1)/eg;
$inc =~ s/#NODE#/$node/eg;
$inc =~ s/\$NODE/$node/eg;
$inc =~ s/#NTYPE#/$nodetype/eg;
$inc =~ s/#NFSSERVER#/$nfsserver/eg;
$inc =~ s/#INSTALLNIC#/$installnic/eg;
$inc =~ s/#PRIMARYNIC#/$primarynic/eg;
@ -1072,6 +1076,29 @@ sub subroutine
return $result;
}
sub getNodeType
{
my $node = shift;
my $result;
# see if this is a service or compute node?
if (xCAT::Utils->isSN($node))
{
$result="service";
}
else
{
$result="compute";
}
return $result;
}
sub getVlanItems
{