2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge pull request #4339 from whowutwut/rflash_nonverbose_singlemsg

[OpenBMC] rflash - Add messages to inform the user of the general action started via xCAT
This commit is contained in:
Mark Gurevich 2017-11-27 09:17:42 -05:00 committed by GitHub
commit 97cfcac18e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -935,7 +935,7 @@ sub parse_args {
}
}
# show options parsed in bypass mode
print "DEBUG filename=$filename_passed, updateid=$updateid_passed, options=$option_flag, verbose=$verbose, invalid=$invalid_options\n";
print "DEBUG filename=$filename_passed, updateid=$updateid_passed, options=$option_flag, invalid=$invalid_options rflash_arguments=@flash_arguments\n";
if ($option_flag =~ tr{ }{ } > 0) {
unless ($verbose) {
@ -952,6 +952,7 @@ 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) {
@ -959,6 +960,11 @@ sub parse_args {
if ($option_flag !~ /^-d$|^--delete$|^-a$|^--activate$/) {
return ([ 1, "Invalid option specified when an update id is provided: $option_flag" ]);
}
my $action = "activate";
if ($option_flag =~ /^-d$|^--delete$/) {
$action = "delete";
}
xCAT::SvrUtils::sendmsg("Attempting to $action ID=$flash_arguments[0], please wait...", $callback);
}
else {
# Neither Filename nor updateid was not passed, check flags allowed without file or updateid