We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2568bef + 05f15d3 commit 28b7817Copy full SHA for 28b7817
linux_os/guide/system/network/network-nftables/nftables_ensure_default_deny_policy/sce/ubuntu.sh
@@ -5,9 +5,9 @@
5
# Check if default policy is drop
6
output=$(nft list ruleset)
7
8
-if ! (grep 'hook input' "$output" |& grep -w 'policy drop' &>/dev/null &&\
9
- grep 'hook forward' "$output" |& grep -w 'policy drop' &>/dev/null &&\
10
- grep 'hook output' "$output" |& grep -w 'policy drop' &>/dev/null); then
+if ! (echo "$output" | grep 'hook input' |& grep -wq 'policy drop' &&\
+ echo "$output" | grep 'hook forward' |& grep -wq 'policy drop' &&\
+ echo "$output" | grep 'hook output' |& grep -wq 'policy drop'); then
11
exit "${XCCDF_RESULT_FAIL}"
12
fi
13
0 commit comments