install_easy: init detection incompat with openrc, DNS check replace kinozal

This commit is contained in:
bol-van
2021-11-24 13:03:42 +03:00
parent 473a2c59e2
commit c066cf03cc
2 changed files with 7 additions and 3 deletions

View File

@@ -54,7 +54,9 @@ check_system()
local UNAME=$(uname)
if [ "$UNAME" = "Linux" ]; then
# do not use 'exe' because it requires root
local INIT="$(basename $(sed 's/\x0/\n/g' /proc/1/cmdline | head -n 1))"
local INIT=$(sed 's/\x0/\n/g' /proc/1/cmdline | head -n 1)
[ -L "$INIT" ] && INIT=$(readlink "$INIT")
INIT=$(basename "$INIT")
# some distros include systemctl without systemd
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$INIT" = "systemd" ]; then
SYSTEM=systemd