Correct erroneous output on nodeset when using xnba.pm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10963 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-11-03 14:54:59 +00:00
parent 64b86f4a67
commit 65b159d157

View File

@ -495,11 +495,12 @@ sub process_request {
$callback->(\%response);
} elsif ($args[0]) { #If anything else, send it on to the destiny plugin, then setstate
($rc,$errstr) = setstate($_,\%bphash,\%chainhash,\%machash,\%iscsihash);
if ($rc) {
$response{node}->[0]->{errorcode}->[0]= $rc;
$response{node}->[0]->{errorc}->[0]= $errstr;
$callback->(\%response);
}
#currently, it seems setstate doesn't return error codes...
#if ($rc) {
# $response{node}->[0]->{errorcode}->[0]= $rc;
# $response{node}->[0]->{errorc}->[0]= $errstr;
# $callback->(\%response);
#}
if($args[0] eq 'offline') {
unlink($tftpdir."/xcat/xnba/nodes/".$_);
unlink($tftpdir."/xcat/xnba/nodes/".$_.".pxelinux");