From b5325f45ff68c69d56314d51bd4261a40fa0d697 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 18 Feb 2019 13:04:08 +0200 Subject: [PATCH] Fix systemd detection logic --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index bb8de1d60..bd46d036e 100755 --- a/install +++ b/install @@ -152,11 +152,11 @@ function systemInitDetect() { # Get package of PID=1 path as it identifies the init system. # Allow this to fail, at least then the init system can be guessed from the # PID 1 executable alone - pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || + pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null || echo "unknown") verbose "Detected package name for PID=1 process: $pid_1_package" - case "${pid_1_package:$pid_1_path}" in + case "${pid_1_package}:${pid_1_path}" in *systemd*) has_systemd_init=true; verbose "Detected init system type: systemd" ;; *upstart*) has_upstart_init=true; verbose "Detected init system type: Upstart" ;; *sysvinit*) has_systemv_init=true; verbose "Detected init system type: System V" ;;