line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Solaris; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
34733656
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
100
|
|
4
|
1
|
|
|
1
|
|
10
|
use warnings; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
133
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
124
|
|
|
1
|
|
|
|
|
44
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
2787
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
193
|
|
9
|
1
|
|
|
1
|
|
665
|
use FusionInventory::Agent::Tools::Solaris; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
310
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $runAfter = ["FusionInventory::Agent::Task::Inventory::Generic"]; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub isEnabled { |
14
|
0
|
|
|
0
|
0
|
|
return $OSNAME eq 'solaris'; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub doInventory { |
18
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Operating system informations |
23
|
0
|
|
|
|
|
|
my $info = getReleaseInfo(); |
24
|
0
|
|
|
|
|
|
my $kernelArch = getFirstLine(command => 'arch -k'); |
25
|
0
|
|
|
|
|
|
my $kernelVersion = getFirstLine(command => 'uname -v'); |
26
|
0
|
|
|
|
|
|
my $proct = getFirstLine(command => 'uname -p'); |
27
|
0
|
|
|
|
|
|
my $platform = getFirstLine(command => 'uname -i'); |
28
|
0
|
|
|
|
|
|
my $hostid = getFirstLine(command => 'hostid'); |
29
|
0
|
|
|
|
|
|
my $description = "$platform($kernelArch)/$proct HostID=$hostid"; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$inventory->setHardware({ |
32
|
|
|
|
|
|
|
OSNAME => "Solaris", |
33
|
|
|
|
|
|
|
OSVERSION => $info->{version}, |
34
|
|
|
|
|
|
|
OSCOMMENTS => $info->{subversion}, |
35
|
0
|
|
|
|
|
|
DESCRIPTION => $description |
36
|
|
|
|
|
|
|
}); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$inventory->setOperatingSystem({ |
39
|
|
|
|
|
|
|
NAME => "Solaris", |
40
|
|
|
|
|
|
|
FULL_NAME => $info->{fullname}, |
41
|
|
|
|
|
|
|
VERSION => $info->{version}, |
42
|
|
|
|
|
|
|
SERVICE_PACK => $info->{subversion}, |
43
|
0
|
|
|
|
|
|
KERNEL_VERSION => $kernelVersion |
44
|
|
|
|
|
|
|
}); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |