line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Zane C. Bowers-Hadley |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Virtualization::CBSD::cbsd_base_dir; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
69540
|
use strict; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
30
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.0.1'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
535
|
use Rex::Logger; |
|
1
|
|
|
|
|
11775
|
|
|
1
|
|
|
|
|
43
|
|
13
|
1
|
|
|
1
|
|
502
|
use Rex::Helper::Run; |
|
1
|
|
|
|
|
80214
|
|
|
1
|
|
|
|
|
79
|
|
14
|
1
|
|
|
1
|
|
11
|
use Term::ANSIColor qw(colorstrip); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
942
|
|
15
|
1
|
|
|
1
|
|
13
|
use Rex::Commands::User; |
|
1
|
|
|
|
|
106744
|
|
|
1
|
|
|
|
|
10
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub execute { |
18
|
0
|
|
|
0
|
0
|
|
my ($class) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
Rex::Logger::debug("Geting the CBSD base dir "); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my %cbsd; |
23
|
|
|
|
|
|
|
eval{ |
24
|
0
|
|
|
|
|
|
%cbsd= get_user('cbsd'); |
25
|
0
|
0
|
|
|
|
|
} or do{ |
26
|
0
|
|
0
|
|
|
|
my $error = $@ || 'Unknown failure'; |
27
|
0
|
|
|
|
|
|
die ( "get_user('cbsd') died with... ".$error ); |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $cbsd{home}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |