mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
install_prereq: fix macos
This commit is contained in:
parent
2184d35907
commit
85219cfc38
@ -654,3 +654,31 @@ check_prerequisites_openwrt()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select_ipv6()
|
||||||
|
{
|
||||||
|
local T=N
|
||||||
|
|
||||||
|
[ "$DISABLE_IPV6" != '1' ] && T=Y
|
||||||
|
local old6=$DISABLE_IPV6
|
||||||
|
echo
|
||||||
|
if ask_yes_no $T "enable ipv6 support"; then
|
||||||
|
DISABLE_IPV6=0
|
||||||
|
else
|
||||||
|
DISABLE_IPV6=1
|
||||||
|
fi
|
||||||
|
[ "$old6" != "$DISABLE_IPV6" ] && write_config_var DISABLE_IPV6
|
||||||
|
}
|
||||||
|
select_fwtype()
|
||||||
|
{
|
||||||
|
echo
|
||||||
|
[ $(get_ram_mb) -le 400 ] && {
|
||||||
|
echo WARNING ! you are running a low RAM system
|
||||||
|
echo WARNING ! nft requires lots of RAM to load huge ip sets, much more than ipsets require
|
||||||
|
echo WARNING ! if you need large lists it may be necessary to fall back to iptables+ipset firewall
|
||||||
|
}
|
||||||
|
echo select firewall type :
|
||||||
|
ask_list FWTYPE "iptables nftables" "$FWTYPE" && write_config_var FWTYPE
|
||||||
|
}
|
@ -209,31 +209,6 @@ select_getlist()
|
|||||||
GETLIST=""
|
GETLIST=""
|
||||||
write_config_var GETLIST
|
write_config_var GETLIST
|
||||||
}
|
}
|
||||||
select_ipv6()
|
|
||||||
{
|
|
||||||
local T=N
|
|
||||||
|
|
||||||
[ "$DISABLE_IPV6" != '1' ] && T=Y
|
|
||||||
local old6=$DISABLE_IPV6
|
|
||||||
echo
|
|
||||||
if ask_yes_no $T "enable ipv6 support"; then
|
|
||||||
DISABLE_IPV6=0
|
|
||||||
else
|
|
||||||
DISABLE_IPV6=1
|
|
||||||
fi
|
|
||||||
[ "$old6" != "$DISABLE_IPV6" ] && write_config_var DISABLE_IPV6
|
|
||||||
}
|
|
||||||
select_fwtype()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
[ $(get_ram_mb) -le 400 ] && {
|
|
||||||
echo WARNING ! you are running a low RAM system
|
|
||||||
echo WARNING ! nft requires lots of RAM to load huge ip sets, much more than ipsets require
|
|
||||||
echo WARNING ! if you need large lists it may be necessary to fall back to iptables+ipset firewall
|
|
||||||
}
|
|
||||||
echo select firewall type :
|
|
||||||
ask_list FWTYPE "iptables nftables" "$FWTYPE" && write_config_var FWTYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
ask_config()
|
ask_config()
|
||||||
{
|
{
|
||||||
|
@ -15,38 +15,6 @@ ZAPRET_BASE="$EXEDIR"
|
|||||||
. "$ZAPRET_BASE/common/installer.sh"
|
. "$ZAPRET_BASE/common/installer.sh"
|
||||||
. "$ZAPRET_BASE/common/ipt.sh"
|
. "$ZAPRET_BASE/common/ipt.sh"
|
||||||
|
|
||||||
select_ipv6()
|
|
||||||
{
|
|
||||||
local T=N
|
|
||||||
|
|
||||||
[ "$DISABLE_IPV6" != '1' ] && T=Y
|
|
||||||
local old6=$DISABLE_IPV6
|
|
||||||
echo
|
|
||||||
if ask_yes_no $T "enable ipv6 support"; then
|
|
||||||
DISABLE_IPV6=0
|
|
||||||
else
|
|
||||||
DISABLE_IPV6=1
|
|
||||||
fi
|
|
||||||
[ "$old6" != "$DISABLE_IPV6" ] && write_config_var DISABLE_IPV6
|
|
||||||
}
|
|
||||||
select_fwtype()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
[ $(get_ram_mb) -le 400 ] && {
|
|
||||||
echo WARNING ! you are running a low RAM system
|
|
||||||
echo WARNING ! nft requires lots of RAM to load huge ip sets, much more than ipsets require
|
|
||||||
echo WARNING ! if you need large lists it may be necessary to fall back to iptables+ipset firewall
|
|
||||||
}
|
|
||||||
echo select firewall type :
|
|
||||||
ask_list FWTYPE "iptables nftables" "$FWTYPE" && write_config_var FWTYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
ask_config()
|
|
||||||
{
|
|
||||||
[ "$SYSTEM" = openwrt ] && select_ipv6
|
|
||||||
select_fwtype
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# build binaries, do not use precompiled
|
# build binaries, do not use precompiled
|
||||||
[ "$1" = "make" ] && FORCE_BUILD=1
|
[ "$1" = "make" ] && FORCE_BUILD=1
|
||||||
@ -55,13 +23,17 @@ umask 0022
|
|||||||
fsleep_setup
|
fsleep_setup
|
||||||
fix_sbin_path
|
fix_sbin_path
|
||||||
check_system
|
check_system
|
||||||
|
[ $UNAME = "Linux" ] || {
|
||||||
|
echo no prerequisites required for $SYSTEM
|
||||||
|
}
|
||||||
require_root
|
require_root
|
||||||
ask_config
|
|
||||||
|
|
||||||
case $UNAME in
|
case $UNAME in
|
||||||
Linux)
|
Linux)
|
||||||
|
select_fwtype
|
||||||
case $SYSTEM in
|
case $SYSTEM in
|
||||||
openwrt)
|
openwrt)
|
||||||
|
select_ipv6
|
||||||
check_prerequisites_openwrt
|
check_prerequisites_openwrt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user