Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use 'arch' to initialize OPERATINSYSTEM/ARCH
- Loading branch information
Gonéri Le Bouder
committed
Oct 22, 2012
1 parent
c7bfff3
commit 75da0cd
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Arch.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package FusionInventory::Agent::Task::Inventory::Input::Generic::Arch; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use FusionInventory::Agent::Tools; | ||
|
||
my $seen; | ||
|
||
sub isEnabled { | ||
return canRun('arch'); | ||
} | ||
|
||
sub doInventory { | ||
my (%params) = @_; | ||
|
||
my $inventory = $params{inventory}; | ||
my $logger = $params{logger}; | ||
|
||
my $arch = getFirstLine( command => 'arch' ); | ||
|
||
$inventory->setOperatingSystem({ | ||
ARCH => $arch | ||
}); | ||
|
||
} | ||
|
||
1; |