2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 18:00:38 +00:00

modified depending on comments

This commit is contained in:
XuWei
2017-12-07 19:14:39 -05:00
parent b11a45caa4
commit 8c97ae5208

View File

@ -3726,10 +3726,13 @@ sub rflash_upload {
process_debug_info($node, $debugmsg);
}
my $curl_upload_result = `$upload_cmd`;
if (!$curl_upload_result) {
xCAT::SvrUtils::sendmsg([1, "Did not receive response from OpenBMC after running command '$upload_cmd'"], $callback, $node);
return 1;
}
eval { $h = from_json($curl_upload_result) }; # convert command output to hash
if ($@) {
xCAT::SvrUtils::sendmsg([1, "Received wrong format response from command '$upload_cmd'"], $callback, $node);
xCAT::SvrUtils::sendmsg([1, "Received wrong format response '$curl_upload_result'"], $callback, $node);
xCAT::SvrUtils::sendmsg([1, "Received wrong format response from command '$upload_cmd': $curl_upload_result"], $callback, $node);
return 1;
}
if ($h->{message} eq $::RESPONSE_OK) {