Handle dig timing out gracefully in staticstub

(cherry picked from commit cc7c4760aa)
This commit is contained in:
Tom Krizek
2024-01-05 15:13:56 +01:00
parent 758f03f4f8
commit 43f9261157

View File

@@ -203,8 +203,8 @@ status=$(expr $status + $ret)
n=$(expr $n + 1)
echo_i "checking static-stub of a undelegated tld resolves after DS query ($n)"
ret=0
$DIG $DIGOPTS undelegated. @10.53.0.2 ds >dig.out.ns2.ds.test$n
$DIG $DIGOPTS undelegated. @10.53.0.2 soa >dig.out.ns2.soa.test$n
$DIG $DIGOPTS undelegated. @10.53.0.2 ds >dig.out.ns2.ds.test$n || ret=1
$DIG $DIGOPTS undelegated. @10.53.0.2 soa >dig.out.ns2.soa.test$n || ret=1
grep "status: NXDOMAIN" dig.out.ns2.ds.test$n >/dev/null || ret=1
grep "status: NOERROR" dig.out.ns2.soa.test$n >/dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi