mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
install_easy: always check init process name in detection
This commit is contained in:
parent
528328a2b5
commit
45c3aa2796
@ -206,12 +206,13 @@ check_system()
|
|||||||
|
|
||||||
local UNAME=$(uname)
|
local UNAME=$(uname)
|
||||||
if [ "$UNAME" = "Linux" ]; then
|
if [ "$UNAME" = "Linux" ]; then
|
||||||
|
local INIT="$(basename $(readlink /proc/1/exe))"
|
||||||
# some distros include systemctl without systemd
|
# some distros include systemctl without systemd
|
||||||
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$(basename $(readlink /proc/1/exe))" = "systemd" ]; then
|
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$INIT" = "systemd" ]; then
|
||||||
SYSTEM=systemd
|
SYSTEM=systemd
|
||||||
elif exists rc-update && [ "$(basename $(readlink /proc/1/exe))" = "openrc-init" ]; then
|
elif exists rc-update && [ "$INIT" = "openrc-init" ]; then
|
||||||
SYSTEM=openrc
|
SYSTEM=openrc
|
||||||
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
|
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci && [ "$INIT" = "procd" ] ; then
|
||||||
SYSTEM=openwrt
|
SYSTEM=openwrt
|
||||||
else
|
else
|
||||||
echo system is not either systemd, openrc or openwrt based
|
echo system is not either systemd, openrc or openwrt based
|
||||||
|
@ -53,12 +53,13 @@ check_system()
|
|||||||
|
|
||||||
local UNAME=$(uname)
|
local UNAME=$(uname)
|
||||||
if [ "$UNAME" = "Linux" ]; then
|
if [ "$UNAME" = "Linux" ]; then
|
||||||
|
local INIT="$(basename $(readlink /proc/1/exe))"
|
||||||
# some distros include systemctl without systemd
|
# some distros include systemctl without systemd
|
||||||
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$(basename $(readlink /proc/1/exe))" = "systemd" ]; then
|
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$INIT" = "systemd" ]; then
|
||||||
SYSTEM=systemd
|
SYSTEM=systemd
|
||||||
elif exists rc-update && [ "$(basename $(readlink /proc/1/exe))" = "openrc-init" ]; then
|
elif exists rc-update && [ "$INIT" = "openrc-init" ]; then
|
||||||
SYSTEM=openrc
|
SYSTEM=openrc
|
||||||
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
|
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci && [ "$INIT" = "procd" ] ; then
|
||||||
SYSTEM=openwrt
|
SYSTEM=openwrt
|
||||||
else
|
else
|
||||||
echo system is not either systemd, openrc or openwrt based
|
echo system is not either systemd, openrc or openwrt based
|
||||||
|
Loading…
Reference in New Issue
Block a user