/[soft]/drakwizard/trunk/common/Wizcommon.pm
ViewVC logotype

Diff of /drakwizard/trunk/common/Wizcommon.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8719 by tv, Wed Oct 17 16:30:35 2012 UTC revision 8720 by djennings, Fri Aug 23 23:53:27 2013 UTC
# Line 28  use MDK::Common; Line 28  use MDK::Common;
28  use MDK::Wizard::IFCFG;  use MDK::Wizard::IFCFG;
29    
30  our @ISA = qw(Exporter);  our @ISA = qw(Exporter);
31  our @EXPORT = qw(check_started check_starts_on_boot test_host_domain);  our @EXPORT = qw(check_started check_starts_on_boot test_host_domain reload_or_restart);
32    
33  sub check_dhcp {  sub check_dhcp {
34      my ($wiz) = @_;      my ($wiz) = @_;
# Line 48  sub check_started { Line 48  sub check_started {
48    return 'error_end' if !$isrunning;    return 'error_end' if !$isrunning;
49  }  }
50    
51    sub reload_or_restart {
52        my ($service) = @_;
53        if (run_program::rooted($::prefix, '/bin/mountpoint', '-q', '/sys/fs/cgroup/systemd')) {
54            run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service");
55        } else {
56            run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", "restart");
57        }
58    }
59    
60  sub check_starts_on_boot($$) {  sub check_starts_on_boot($$) {
61      my ($in, $servicename) = @_;      my ($in, $servicename) = @_;
62      if (!services::starts_on_boot($servicename)) {      if (!services::starts_on_boot($servicename)) {

Legend:
Removed from v.8719  
changed lines
  Added in v.8720

  ViewVC Help
Powered by ViewVC 1.1.30