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"; }