From dc9d596247541f2c679151c85800bfeea558f3a3 Mon Sep 17 00:00:00 2001 From: bol-van Date: Mon, 10 Jan 2022 12:39:12 +0300 Subject: [PATCH] blockcheck: grep whole string match --- blockcheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockcheck.sh b/blockcheck.sh index 1db140c..45c8936 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -117,7 +117,7 @@ IPFW_DEL() } 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 Linux) 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. [ "$SUBSYS" = openwrt ] && echo 'OpenWRT : opkg update ; opkg install iptables-mod-nfqueue' exitp 6