mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
Change to only display the active firmware instead of any firmware that is listed and add in the software id into the output so that sorting would keep the various software information together.
This commit is contained in:
@ -1036,25 +1036,31 @@ sub rinv_response {
|
||||
# Handle printing out all posssible Software values in a generic format:
|
||||
# node: <Purpose> Software: <version> (<Activation>)
|
||||
#
|
||||
my $sw_id = (split(/\//, $key_url))[-1];
|
||||
if (defined($content{Version}) and $content{Version}) {
|
||||
my $purpose_value = uc ((split(/\./, $content{Purpose}))[-1]);
|
||||
my $activation_value = (split(/\./, $content{Activation}))[-1];
|
||||
#
|
||||
# The space below between "SOFTWARE:" and $content{Version} is intentional
|
||||
# to cause the sorting of this line before any additional info lines
|
||||
# For 'rinv firm', only print Active software. 'rflash list' will handle others
|
||||
#
|
||||
$content_info = "$purpose_value SOFTWARE: $content{Version} ($activation_value)";
|
||||
push (@sorted_output, $content_info);
|
||||
|
||||
if ($content{ExtendedVersion} ne "") {
|
||||
# ExtendedVersion is going to be a comma separated list of additional software
|
||||
my @versions = split(',', $content{ExtendedVersion});
|
||||
foreach my $ver (@versions) {
|
||||
$content_info = "$purpose_value SOFTWARE: -- additional info: $ver";
|
||||
push (@sorted_output, $content_info);
|
||||
if ($activation_value =~ "Active") {
|
||||
#
|
||||
# The space below between "SOFTWARE:" and $content{Version} is intentional
|
||||
# to cause the sorting of this line before any additional info lines
|
||||
#
|
||||
$content_info = "$purpose_value SOFTWARE[$sw_id]: $content{Version} ($activation_value)";
|
||||
push (@sorted_output, $content_info);
|
||||
|
||||
if (defined($content{ExtendedVersion}) and $content{ExtendedVersion} ne "") {
|
||||
# ExtendedVersion is going to be a comma separated list of additional software
|
||||
my @versions = split(',', $content{ExtendedVersion});
|
||||
foreach my $ver (@versions) {
|
||||
$content_info = "$purpose_value SOFTWARE[$sw_id]: -- additional info: $ver";
|
||||
push (@sorted_output, $content_info);
|
||||
}
|
||||
}
|
||||
next;
|
||||
}
|
||||
next;
|
||||
}
|
||||
} else {
|
||||
if (! defined $content{Present}) {
|
||||
|
Reference in New Issue
Block a user