From 722a775ce644d15e6e8ebc446c64bffc8f5bd24f Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 7 Dec 2017 05:26:42 -0500 Subject: [PATCH 1/2] enhance rflash upload message --- xCAT-server/lib/xcat/plugins/openbmc.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 9870a2c4e..4743420a8 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1102,7 +1102,6 @@ sub parse_args { if ($option_flag !~ /^-c$|^--check$|^-u$|^--upload$|^-a$|^--activate$/) { return ([ 1, "Invalid option specified when a file is provided: $option_flag" ]); } - xCAT::SvrUtils::sendmsg("Attempting to upload $flash_arguments[0], please wait...", $callback); } else { if ($updateid_passed) { @@ -3706,7 +3705,7 @@ sub rflash_upload { if ($h->{message} eq $::RESPONSE_OK) { foreach my $upload_cmd(@curl_upload_cmds){ while((my $file,my $version)=each(%fw_tar_files)){ - my $uploading_msg = "Uploading $file ..."; + my $uploading_msg = "Attempting to upload $file, please wait ..."; # Login successfull, upload the file if ($::VERBOSE) { xCAT::SvrUtils::sendmsg("$uploading_msg", $callback, $node); From 94a1e2a8306310a70aea09bd0f81aa615c8bf1a8 Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 7 Dec 2017 21:40:05 -0500 Subject: [PATCH 2/2] polished message --- xCAT-server/lib/xcat/plugins/openbmc.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 4743420a8..b1fd448ff 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1637,6 +1637,11 @@ sub parse_command_status { } } } + if ($upload or $::UPLOAD_AND_ACTIVATE) { + xCAT::SvrUtils::sendmsg("Attempting to upload $::UPLOAD_FILE, please wait...", $callback); + } elsif ($::UPLOAD_ACTIVATE_STREAM) { + xCAT::SvrUtils::sendmsg("Attempting to upload $::UPLOAD_FILE and $::UPLOAD_PNOR, please wait...", $callback); + } if ($check_version) { # Display firmware version on BMC $next_status{LOGIN_RESPONSE} = "RINV_FIRM_REQUEST"; @@ -3705,7 +3710,7 @@ sub rflash_upload { if ($h->{message} eq $::RESPONSE_OK) { foreach my $upload_cmd(@curl_upload_cmds){ while((my $file,my $version)=each(%fw_tar_files)){ - my $uploading_msg = "Attempting to upload $file, please wait ..."; + my $uploading_msg = "Uploading $file ..."; # Login successfull, upload the file if ($::VERBOSE) { xCAT::SvrUtils::sendmsg("$uploading_msg", $callback, $node);