line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Cron::SunOS; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
32
|
use v5.12.5; |
|
1
|
|
|
|
|
12
|
|
8
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
57
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.2'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
16
|
use Rex::Cron::Base; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
36
|
|
13
|
1
|
|
|
1
|
|
45
|
use base qw(Rex::Cron::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
111
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
12
|
use Rex::Helper::Run; |
|
1
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
81
|
|
16
|
1
|
|
|
1
|
|
26
|
use Rex::Commands::Fs; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
24
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
0
|
|
my $that = shift; |
20
|
0
|
|
0
|
|
|
|
my $proto = ref($that) || $that; |
21
|
0
|
|
|
|
|
|
my $self = $proto->SUPER::new(@_); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
bless( $self, $proto ); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub read_user_cron { |
29
|
0
|
|
|
0
|
0
|
|
my ( $self, $user ) = @_; |
30
|
0
|
|
|
|
|
|
my @lines = i_run "crontab -l $user"; |
31
|
0
|
|
|
|
|
|
$self->parse_cron(@lines); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub activate_user_cron { |
35
|
0
|
|
|
0
|
0
|
|
my ( $self, $file, $user ) = @_; |
36
|
0
|
|
|
|
|
|
i_run "crontab $file"; |
37
|
0
|
|
|
|
|
|
unlink $file; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |