line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::HPUX; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25194111
|
use strict; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
68
|
|
4
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
52
|
|
|
1
|
|
|
|
|
24
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1069
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
236
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $runAfter = ["FusionInventory::Agent::Task::Inventory::Generic"]; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub isEnabled { |
13
|
0
|
|
|
0
|
0
|
|
return $OSNAME eq 'hpux'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub doInventory { |
17
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Operating system informations |
22
|
0
|
|
|
|
|
|
my $kernelVersion = getFirstLine(command => 'uname -v'); |
23
|
0
|
|
|
|
|
|
my $kernelRelease = getFirstLine(command => 'uname -r'); |
24
|
0
|
|
|
|
|
|
my $OSLicense = getFirstLine(command => 'uname -l'); |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
$inventory->setHardware({ |
27
|
|
|
|
|
|
|
OSNAME => 'HP-UX', |
28
|
|
|
|
|
|
|
OSVERSION => $kernelVersion . ' ' . $OSLicense, |
29
|
|
|
|
|
|
|
OSCOMMENTS => $kernelRelease, |
30
|
|
|
|
|
|
|
}); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$inventory->setOperatingSystem({ |
33
|
|
|
|
|
|
|
NAME => 'HP-UX', |
34
|
|
|
|
|
|
|
VERSION => $kernelRelease, |
35
|
|
|
|
|
|
|
KERNEL_VERSION => $kernelRelease, |
36
|
|
|
|
|
|
|
}); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |