Set CALLBACK for runcmd and runxcmd.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5166 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2010-02-05 16:02:23 +00:00
parent 02bb6bb628
commit 736fde527a
2 changed files with 16 additions and 2 deletions

View File

@ -95,6 +95,9 @@ sub preprocess_request
my %sn;
# need for runcmd output
$::CALLBACK=$cb;
# don't want preprocess to run on service node but _xcatdest is not set??
#if ($req->{_xcatdest}) { return [$req]; } #exit if preprocessed
@ -327,6 +330,8 @@ sub process_request
my $msg;
$::callback=$callback;
# need for runcmd output
$::CALLBACK=$callback;
# convert the hashes back to the way they were passed in
# XML created arrays - we need to strip them out

View File

@ -75,6 +75,9 @@ sub preprocess_request
my $cb = shift;
my %sn;
# need for runcmd output
$::CALLBACK=$cb;
#exit if preprocessed
if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; }
@ -150,6 +153,9 @@ sub process_request
$::request = shift;
my $callback = shift;
# need for runcmd output
$::CALLBACK=$callback;
my $ret;
my $msg;
my $rsp;
@ -1047,7 +1053,7 @@ ions.\n";
# - NIM can't handle that
if ($#members > 1024) {
my $rsp;
$rsp->{data}->[0] = "$::msgstr Cannot create a NIM group definition with more than 1024 members - on \'$servname\'.";
$rsp->{data}->[0] = "$::msgstr Cannot create a NIM group definition with more than 1024 members.";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
@ -1078,6 +1084,7 @@ ions.\n";
}
my $output = xCAT::Utils->runcmd("$cmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
@ -1254,7 +1261,9 @@ sub getNIMmaster
$NimMaster = $::objhash{$node}{xcatmaster};
} else {
$NimMaster = $::local_host;
my $nimprime = xCAT::InstUtils->getnimprime();
chomp $nimprime;
$NimMaster = $nimprime;
}
# assume short hostnames for now???