mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
blockcheck: override FWTYPE
This commit is contained in:
parent
75a81afa39
commit
b7aa3a878c
@ -159,8 +159,8 @@ check_system()
|
|||||||
|
|
||||||
UNAME=$(uname)
|
UNAME=$(uname)
|
||||||
SUBSYS=
|
SUBSYS=
|
||||||
FWTYPE=
|
|
||||||
|
|
||||||
|
# can be passed FWTYPE=iptables to override default nftables preference
|
||||||
case "$UNAME" in
|
case "$UNAME" in
|
||||||
Linux)
|
Linux)
|
||||||
PKTWS="$NFQWS"
|
PKTWS="$NFQWS"
|
||||||
@ -175,14 +175,14 @@ check_system()
|
|||||||
# fw4 firewall is used, fw3 is symbolic link to fw4
|
# fw4 firewall is used, fw3 is symbolic link to fw4
|
||||||
# no more firewall includes
|
# no more firewall includes
|
||||||
# make sure nft was not just installed by user but all the system is based on fw4
|
# make sure nft was not just installed by user but all the system is based on fw4
|
||||||
if [ -x /sbin/fw4 ] && exists nft; then
|
if [ -x /sbin/fw4 ] && exists nft && [ "$FWTYPE" != "iptables" ] ; then
|
||||||
FWTYPE=nftables
|
FWTYPE=nftables
|
||||||
else
|
else
|
||||||
FWTYPE=iptables
|
FWTYPE=iptables
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# generic linux
|
# generic linux
|
||||||
if exists nft; then
|
if exists nft && [ "$FWTYPE" != "iptables" ]; then
|
||||||
FWTYPE=nftables
|
FWTYPE=nftables
|
||||||
else
|
else
|
||||||
FWTYPE=iptables
|
FWTYPE=iptables
|
||||||
|
Loading…
Reference in New Issue
Block a user