2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-20 21:20:36 +00:00

To have runxcmd to keep $::callback in case some module use it

This commit is contained in:
ertaozh
2016-07-29 04:19:28 -04:00
parent 4168cc9ba8
commit dd31896c94

View File

@ -1179,6 +1179,7 @@ sub runxcmd
{
my $save_CALLBACK = $::CALLBACK;
my $save_callback = $::callback;
my ($class, $cmd, $subreq, $exitcode, $refoutput) = @_;
$::RUNCMD_RC = 0;
@ -1248,7 +1249,7 @@ sub runxcmd
}
$::CALLBACK = $save_CALLBACK; # in case the subreq call changed it
$::callback = $save_callback; # To keep $::callback also since some module use this global variable
if ($::RUNCMD_RC)
{
my $displayerror = 1;