mirror of
https://github.com/bol-van/zapret.git
synced 2025-01-06 08:20:34 +05:00
install_easy: fake systemd detection
This commit is contained in:
parent
03886dda88
commit
02343afba7
@ -25,8 +25,9 @@ DNSCHECK_DIGS=/tmp/digs.txt
|
|||||||
|
|
||||||
[ -n "$TPPORT" ] || TPPORT=988
|
[ -n "$TPPORT" ] || TPPORT=988
|
||||||
|
|
||||||
SYSTEMD_SYSTEM_DIR=/lib/systemd/system
|
SYSTEMD_DIR=/lib/systemd
|
||||||
[ -d "$SYSTEMD_SYSTEM_DIR" ] || SYSTEMD_SYSTEM_DIR=/usr/lib/systemd/system
|
[ -d "$SYSTEMD_DIR" ] || SYSTEMD_DIR=/usr/lib/systemd
|
||||||
|
[ -d "$SYSTEMD_DIR" ] && SYSTEMD_SYSTEM_DIR="$SYSTEMD_DIR/system"
|
||||||
|
|
||||||
ECHON="echo -n"
|
ECHON="echo -n"
|
||||||
|
|
||||||
@ -155,7 +156,8 @@ check_system()
|
|||||||
|
|
||||||
local UNAME=$(uname)
|
local UNAME=$(uname)
|
||||||
if [ "$UNAME" = "Linux" ]; then
|
if [ "$UNAME" = "Linux" ]; then
|
||||||
if [ -x "$SYSTEMCTL" ] ; then
|
# some distros include systemctl without systemd
|
||||||
|
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMD_DIR/systemd" ] && [ -x "$SYSTEMCTL" ]; then
|
||||||
SYSTEM=systemd
|
SYSTEM=systemd
|
||||||
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
|
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
|
||||||
SYSTEM=openwrt
|
SYSTEM=openwrt
|
||||||
|
Loading…
Reference in New Issue
Block a user