blockcheck: grep whole string match

This commit is contained in:
bol-van 2022-01-10 12:39:12 +03:00
parent 4a922ec8a0
commit dc9d596247

View File

@ -117,7 +117,7 @@ IPFW_DEL()
} }
ipt6_has_raw() ipt6_has_raw()
{ {
grep -Fq raw /proc/net/ip6_tables_names grep -xFq raw /proc/net/ip6_tables_names
} }
@ -176,7 +176,7 @@ check_prerequisites()
case "$UNAME" in case "$UNAME" in
Linux) Linux)
progs="$progs iptables ip6tables" progs="$progs iptables ip6tables"
! grep -Fq NFQUEUE /proc/net/ip_tables_targets || ! grep -Fq NFQUEUE /proc/net/ip6_tables_targets && { ! grep -xFq NFQUEUE /proc/net/ip_tables_targets || ! grep -xFq NFQUEUE /proc/net/ip6_tables_targets && {
echo NFQUEUE iptables or ip6tables target is missing. pls install modules. echo NFQUEUE iptables or ip6tables target is missing. pls install modules.
[ "$SUBSYS" = openwrt ] && echo 'OpenWRT : opkg update ; opkg install iptables-mod-nfqueue' [ "$SUBSYS" = openwrt ] && echo 'OpenWRT : opkg update ; opkg install iptables-mod-nfqueue'
exitp 6 exitp 6