Commit 9fc9ddb9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

is_active_systemd: implemented via distro_info

parent 8c4db57e
......@@ -558,16 +558,9 @@ esac
PMTYPE=$CMD
}
# https://unix.stackexchange.com/questions/196166/how-to-find-out-if-a-system-uses-sysv-upstart-or-systemd-initsystem
is_active_systemd()
{
local a
SYSTEMCTL=/bin/systemctl
#[ -x "$SYSTEMCTL" ] || return
[ -d /run/systemd/system ] || return
#SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd
#[ -d "$SYSTEMD_CGROUP_DIR" ] || return
#cat /proc/1/comm | grep -q 'systemd' && return
[ "$($DISTRVENDOR -y)" = "systemd" ]
}
assure_distr()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment