Fix systemd detection logic

This commit is contained in:
Kyle Robbertze 2019-02-18 13:04:08 +02:00
parent 916cc35058
commit b5325f45ff
1 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ function systemInitDetect() {
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" ;;