summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-04-24 20:10:41 +0000
committerColin Guthrie <colin@mageia.org>2012-04-24 20:10:41 +0000
commit478829f5e7ca7a7db7c6079493acabd8ad91477f (patch)
treec2df220bd489f1f0e3376dccab504b08e0de3703
parent98da704d1abb0af3426915ee04e96660a510ac5b (diff)
downloaddrakx-478829f5e7ca7a7db7c6079493acabd8ad91477f.tar
drakx-478829f5e7ca7a7db7c6079493acabd8ad91477f.tar.gz
drakx-478829f5e7ca7a7db7c6079493acabd8ad91477f.tar.bz2
drakx-478829f5e7ca7a7db7c6079493acabd8ad91477f.tar.xz
drakx-478829f5e7ca7a7db7c6079493acabd8ad91477f.zip
services: Use the appropriate tool to start/stop services
-rw-r--r--perl-install/services.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 179fe0972..f6989806b 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -325,7 +325,11 @@ sub _set_service {
sub _run_action {
my ($service, $action) = @_;
- run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", $action);
+ if (running_systemd()) {
+ run_program::rooted($::prefix, '/bin/systemctl', $action, "$service.service");
+ } else {
+ run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", $action);
+ }
}
sub doit {