diff options
author | Colin Guthrie <colin@mageia.org> | 2012-04-24 20:10:41 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2012-04-24 20:10:41 +0000 |
commit | 96fa3069e6fa08fb782d624263605b185c4556ed (patch) | |
tree | c2df220bd489f1f0e3376dccab504b08e0de3703 /perl-install | |
parent | 6dbd7f22b36a233d9d9b06434a0726736871c464 (diff) | |
download | drakx-backup-do-not-use-96fa3069e6fa08fb782d624263605b185c4556ed.tar drakx-backup-do-not-use-96fa3069e6fa08fb782d624263605b185c4556ed.tar.gz drakx-backup-do-not-use-96fa3069e6fa08fb782d624263605b185c4556ed.tar.bz2 drakx-backup-do-not-use-96fa3069e6fa08fb782d624263605b185c4556ed.tar.xz drakx-backup-do-not-use-96fa3069e6fa08fb782d624263605b185c4556ed.zip |
services: Use the appropriate tool to start/stop services
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/services.pm | 6 |
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 { |