From 15753acb2e4d6f78ef3dfb2110e3129b2450db72 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Mon, 21 Aug 2017 16:30:31 -0500 Subject: [PATCH] Check for systemd before upstart --- init/init-lib.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/init-lib.pl b/init/init-lib.pl index f36c62876..36f1f1c93 100755 --- a/init/init-lib.pl +++ b/init/init-lib.pl @@ -57,14 +57,14 @@ elsif ($config{'hostconfig'}) { elsif ($config{'rc_dir'}) { $init_mode = "rc"; } -elsif ($config{'init_base'} && -d "/etc/init" && &has_command("initctl")) { - $init_mode = "upstart"; - } elsif ($config{'init_base'} && -d "/etc/systemd" && &has_command("systemctl") && &execute_command("systemctl list-units") == 0) { $init_mode = "systemd"; } +elsif ($config{'init_base'} && -d "/etc/init" && &has_command("initctl")) { + $init_mode = "upstart"; + } elsif ($config{'init_base'}) { $init_mode = "init"; }