line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::Environment; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
123302270
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
960
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
6
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
141
|
|
|
1
|
|
|
|
|
75
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
680
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
357
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub isEnabled { |
11
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return |
14
|
|
|
|
|
|
|
# We use WMI for Windows because of charset issue |
15
|
|
|
|
|
|
|
$OSNAME ne 'MSWin32' && |
16
|
0
|
|
0
|
|
|
|
!$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
|
|
|
|
|
|
|
$inventory->addEntry( |
26
|
|
|
|
|
|
|
section => 'ENVS', |
27
|
|
|
|
|
|
|
entry => { |
28
|
|
|
|
|
|
|
KEY => $key, |
29
|
0
|
|
|
|
|
|
VAL => $ENV{$key} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |