File Coverage

lib/Rex/Service/Mageia.pm
Criterion Covered Total %
statement 8 14 57.1
branch n/a
condition 0 3 0.0
subroutine 3 4 75.0
pod 0 1 0.0
total 11 22 50.0


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Service::Mageia;
6              
7 1     1   17 use v5.12.5;
  1         11  
8 1     1   8 use warnings;
  1         5  
  1         58  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 1     1   7 use base qw(Rex::Service::Base);
  1         15  
  1         190  
13              
14             sub new {
15 0     0 0   my $that = shift;
16 0   0       my $proto = ref($that) || $that;
17 0           my $self = $proto->SUPER::new(@_);
18              
19 0           bless( $self, $proto );
20              
21             $self->{commands} = {
22 0           start => '/etc/rc.d/init.d/%s start',
23             restart => '/etc/rc.d/init.d/%s restart',
24             stop => '/etc/rc.d/init.d/%s stop',
25             reload => '/etc/rc.d/init.d/%s reload',
26             status => '/etc/rc.d/init.d/%s status',
27             ensure_stop => 'chkconfig %s off',
28             ensure_start => 'chkconfig %s on',
29             action => '/etc/rc.d/init.d/%s %s',
30             };
31              
32 0           return $self;
33             }
34              
35             1;