summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorNicolas Lécureuil <neoclust@mageia.org>2021-01-10 16:06:50 +0100
committerNicolas Lécureuil <neoclust@mageia.org>2021-01-10 16:06:50 +0100
commit53ac47cbae05d4afb641c5e4875f6fda0759308f (patch)
treefd9518284037c20dc692c4573d9079771781136d /common
parent0c41d182c5bed7d04aaae5bfedccef715224ef3e (diff)
downloaddrakwizard-53ac47cbae05d4afb641c5e4875f6fda0759308f.tar
drakwizard-53ac47cbae05d4afb641c5e4875f6fda0759308f.tar.gz
drakwizard-53ac47cbae05d4afb641c5e4875f6fda0759308f.tar.bz2
drakwizard-53ac47cbae05d4afb641c5e4875f6fda0759308f.tar.xz
drakwizard-53ac47cbae05d4afb641c5e4875f6fda0759308f.zip
reload_or_restart: Do not check if the service is a systemd service or
not. Systemd know how to handle sysvinit services as well as systemd service. This wasn't working because we were checking /sys/fs/cgroup/systemd which does not exist anymore.
Diffstat (limited to 'common')
-rw-r--r--common/Wizcommon.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index e9eeaa09..e6a23c5b 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -50,11 +50,7 @@ sub check_started {
sub reload_or_restart {
my ($service) = @_;
- if (run_program::rooted($::prefix, '/bin/mountpoint', '-q', '/sys/fs/cgroup/systemd')) {
- run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service");
- } else {
- run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", "restart");
- }
+ run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service");
}
sub check_starts_on_boot($$) {