line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::HPUX; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
29164517
|
use strict; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
45
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
75
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
49
|
|
|
1
|
|
|
|
|
20
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1187
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
249
|
|
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; |