Skip to content

Commit

Permalink
Merge pull request #302 from Kegeruneku/bug_4725/int/4725_fix_aix_mic…
Browse files Browse the repository at this point in the history
…rocode_info_in_fusion

Bug 4725/int/4725 fix aix microcode info in fusion
  • Loading branch information
jooooooon committed Apr 16, 2014
2 parents 3d22ce4 + 3237c8c commit 67db4cb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions rudder-agent/SOURCES/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ localdepends: ./initial-promises ./detect_os.sh ./files ./fusioninventory-agent
mv $(TMP_DIR)/FusionInventory-Agent-2.3.6 ./fusioninventory-agent-2.3.6
$(PATCH) -d ./fusioninventory-agent-2.3.6 -p1 < ./patches/fusioninventory/2.3.6/0001-4096-char-line-truncation.patch
$(PATCH) -d ./fusioninventory-agent-2.3.6 -p1 < ./patches/fusioninventory/2.3.6/0002-install-d-mkdir-p.patch
$(PATCH) -d ./fusioninventory-agent-2.3.6 -p1 < ./patches/fusioninventory/2.3.6/0004-aix-microcode-version-retrieval.patch
# Fix a lsusb invocation that crashes some SLES machines
$(FIND) ./fusioninventory-agent-2.3.6 -iname "USB.pm" -exec rm "{}" \;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- a/lib/FusionInventory/Agent/Task/Inventory/AIX.pm 2014-02-03 09:42:06.000000000 +0100
+++ a/lib/FusionInventory/Agent/Task/Inventory/AIX.pm 2014-04-15 16:09:46.264212645 +0200
@@ -42,12 +42,20 @@

my @infos = getLsvpdInfos(logger => $logger);

- my $bversion;
- my $system = first { $_->{DS} eq 'System Firmware' } @infos;
- $bversion = $system->{RM} if $system;
+ # Get the BIOS version from the System Microcode Image (MI) version, in
+ # 'System Firmware' section of VPD, containing three space separated values:
+ # - the microcode image the system currently runs
+ # - the 'permanent' microcode image
+ # - the 'temporary' microcode image
+ # See http://www.systemscanaix.com/sample_reports/aix61/hardware_configuration.html
+ my $bios_version;

- my $platform = first { $_->{DS} eq 'Platform Firmware' } @infos;
- $bversion .= "(Firmware : $platform->{RM})" if $platform;
+ my $system = first { $_->{DS} eq 'System Firmware' } @infos;
+ if ($system) {
+ # we only return the currently booted firmware
+ my @firmwares = split(' ', $system->{MI});
+ $bios_version = $firmwares[0];
+ }

my $vpd = first { $_->{DS} eq 'System VPD' } @infos;

@@ -87,7 +95,7 @@
SMANUFACTURER => 'IBM',
SMODEL => $vpd->{TM},
SSN => $ssn,
- BVERSION => $bversion,
+ BVERSION => $bios_version,
});

}

0 comments on commit 67db4cb

Please sign in to comment.