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
+2 -2
View File
@@ -43,11 +43,11 @@ rootkey_update() {
[ -z "$dnssec_age" ] && dnssec_age=9
if [ "$dnssec_age" -gt 90 -o "$dnssec" -lt 1 ] ; then
if [ "$dnssec_age" -gt 90 ] || [ "$dnssec" -lt 1 ] ; then
# Feature disabled
return 0
elif [ "$dnssec_ntp" -gt 0 -a ! -f "$UB_TIME_FILE" ] ; then
elif [ "$dnssec_ntp" -gt 0 ] && [ ! -f "$UB_TIME_FILE" ] ; then
# We don't have time yet
return 0
fi