2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #3894 from whowutwut/rinv_display

Reduce the number of firmware that is displayed by rinv to the active firmware (partial)
This commit is contained in:
Mark Gurevich 2017-09-11 15:30:34 -04:00 committed by GitHub
commit 42db21b269

View File

@ -1399,15 +1399,23 @@ sub rinv_response {
my $purpose_value = uc ((split(/\./, $content{Purpose}))[-1]);
$purpose_value = "[$sw_id]$purpose_value";
my $activation_value = (split(/\./, $content{Activation}))[-1];
my $priority_value = -1;
if (defined($content{Priority})) {
$priority_value = $content{Priority};
}
#
# For 'rinv firm', only print Active software, unless verbose is specified
#
if ($activation_value =~ "Active" or $::VERBOSE) {
if (($activation_value =~ "Active" and $priority_value == 0) or $::VERBOSE) {
#
# The space below between "Firmware Product Version:" and $content{Version} is intentional
# to cause the sorting of this line before any additional info lines
#
$content_info = "$purpose_value Firmware Product: $content{Version} ($activation_value)";
if ($priority_value == 0) {
# For now, indicate priority 0 software levels with an '*'
$content_info .= "*";
}
push (@sorted_output, $content_info);
if (defined($content{ExtendedVersion}) and $content{ExtendedVersion} ne "") {