line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Solaris; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
26712591
|
use strict; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
116
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
73
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
27
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1365
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
192
|
|
9
|
1
|
|
|
1
|
|
443
|
use FusionInventory::Agent::Tools::Solaris; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
253
|
|
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
|
0
|
|
|
|
|
|
$inventory->setHardware({ |
32
|
|
|
|
|
|
|
OSNAME => "Solaris", |
33
|
|
|
|
|
|
|
OSVERSION => $info->{version}, |
34
|
|
|
|
|
|
|
OSCOMMENTS => $info->{subversion}, |
35
|
|
|
|
|
|
|
DESCRIPTION => $description |
36
|
|
|
|
|
|
|
}); |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$inventory->setOperatingSystem({ |
39
|
|
|
|
|
|
|
NAME => "Solaris", |
40
|
|
|
|
|
|
|
FULL_NAME => $info->{fullname}, |
41
|
|
|
|
|
|
|
VERSION => $info->{version}, |
42
|
|
|
|
|
|
|
SERVICE_PACK => $info->{subversion}, |
43
|
|
|
|
|
|
|
KERNEL_VERSION => $kernelVersion |
44
|
|
|
|
|
|
|
}); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |