to be compatible with the old diskless rootimg(s) before xCAT 2.8

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2013-01-06 05:36:47 +00:00
parent f6dd072207
commit 30cd2dae59

View File

@ -11,7 +11,6 @@ package xCAT_plugin::getpostscript;
use xCAT::Utils;
use xCAT::MsgUtils;
use xCAT::NodeRange;
1;
#-------------------------------------------------------
@ -55,7 +54,7 @@ sub process_request
my @nodes=@$nodes;
# do your processing here
# return info
if($command eq 'postage'){
return postage($nodes, $callback);
}
@ -81,9 +80,13 @@ sub process_request
if ($request->{scripttype}) { $state = $request->{scripttype}->[0];}
require xCAT::Postage;
#my @scriptcontents = xCAT::Postage::makescript($client,$state,$callback); # the original method
my @scriptcontents = xCAT::Postage::makescript([$client],$state,$callback); # the new method, use the template
my $args = $request->{arg};
if( defined($args) && grep(/version2/, @$args)) {
my @scriptcontents = xCAT::Postage::makescript([$client],$state,$callback); # the new method, use the template
} else {
#print "client:$client\n";
my @scriptcontents = xCAT::Postage::makescript($client,$state,$callback); # the original method
}
if (scalar(@scriptcontents)) {
$rsp->{data} = \@scriptcontents;
}