unbound: replace obsolete test expressions

Expressions '-o', '-a', and '\( \)' within test or '[ ]' are obsolete.
POSIX allows few arguments to test, so long expressions are not
portable. '[ p -a q ]' can be replaced with '[ p ] && [ q ]' instead.

Signed-off-by: Eric Luehrsen <ericluehrsen@gmail.com>
This commit is contained in:
Eric Luehrsen
2019-05-13 22:54:07 -04:00
committed by Yousong Zhou
parent 85bc7bc4f3
commit f1d1530f48
6 changed files with 49 additions and 50 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ valid_subnet_any() {
local validip6=$( valid_subnet6 $subnet )
if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
if [ "$validip4" = "ok" ] || [ "$validip6" = "ok" ] ; then
echo "ok"
else
echo "not"