line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::Environment; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
95859461
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
36
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1232
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
67
|
|
6
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
58
|
|
|
1
|
|
|
|
|
93
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
678
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
226
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub isEnabled { |
11
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return |
14
|
|
|
|
|
|
|
# We use WMI for Windows because of charset issue |
15
|
0
|
|
0
|
|
|
|
$OSNAME ne 'MSWin32' && |
16
|
|
|
|
|
|
|
!$params{no_category}->{environment}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub doInventory { |
20
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
foreach my $key (keys %ENV) { |
25
|
0
|
|
|
|
|
|
$inventory->addEntry( |
26
|
|
|
|
|
|
|
section => 'ENVS', |
27
|
|
|
|
|
|
|
entry => { |
28
|
|
|
|
|
|
|
KEY => $key, |
29
|
|
|
|
|
|
|
VAL => $ENV{$key} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |