Skip to content

Commit

Permalink
fix: arch detection under MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Sep 27, 2018
1 parent dfcb645 commit ada9b11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ inventory:
* Enhanced software inventory under Arch Linux
* Fix #453: under MacOS, skip XML DTD validation for software inventory as
parsing may fail if a proxy is enabled
* Fix #473: fix arch detection under MacOS

deploy:
* Bump Deploy task version to 2.7
Expand Down
4 changes: 4 additions & 0 deletions lib/FusionInventory/Agent/Task/Inventory/MacOS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use English qw(-no_match_vars);
use FusionInventory::Agent::Tools;
use FusionInventory::Agent::Tools::MacOS;

our $runAfter = ["FusionInventory::Agent::Task::Inventory::Generic"];

sub isEnabled {
return $OSNAME eq 'darwin';
}
Expand All @@ -23,6 +25,7 @@ sub doInventory {
# basic operating system informations
my $kernelVersion = getFirstLine(command => 'uname -v');
my $kernelRelease = getFirstLine(command => 'uname -r');
my $kernelArch = getFirstLine(command => 'uname -m');

my ($name, $version);
my $infos = getSystemProfilerInfos(type => 'SPSoftwareDataType', logger => $logger);
Expand All @@ -48,6 +51,7 @@ sub doInventory {
FULL_NAME => $name,
VERSION => $version,
KERNEL_VERSION => $kernelRelease,
ARCH => $kernelArch,
BOOT_TIME => getFormatedLocalTime($boottime)
});
}
Expand Down

0 comments on commit ada9b11

Please sign in to comment.