for i in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS axfr secure-to-insecure.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
- egrep '(RRSIG|DNSKEY|NSEC)' dig.out.ns3.test$n > /dev/null && ret=1
+ grep -E '(RRSIG|DNSKEY|NSEC)' dig.out.ns3.test$n > /dev/null && ret=1
[ $ret -eq 0 ] && break
echo_i "waiting ... ($i)"
sleep 2
for i in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS axfr secure-to-insecure2.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
- egrep '(RRSIG|DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1
+ grep -E '(RRSIG|DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1
[ $ret -eq 0 ] && break
echo_i "waiting ... ($i)"
sleep 2
ret=0
echo_i "Checking that default version works for rndc ($n)"
$RNDCCMD 10.53.0.1 status > rndc.status.ns1.$n 2>&1
-fgrep "version: $BIND_VERSION_STRING" rndc.status.ns1.$n > /dev/null || ret=1
+grep -F "version: $BIND_VERSION_STRING" rndc.status.ns1.$n > /dev/null || ret=1
if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
n=`expr $n + 1`
ret=0
echo_i "Checking that custom version works for rndc ($n)"
$RNDCCMD 10.53.0.3 status > rndc.status.ns3.$n 2>&1
-fgrep "version: $BIND_VERSION_STRING (this is a test of version)" rndc.status.ns3.$n > /dev/null || ret=1
+grep -F "version: $BIND_VERSION_STRING (this is a test of version)" rndc.status.ns3.$n > /dev/null || ret=1
if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
n=`expr $n + 1`
ret=0
load_cache
dump_cache
-nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | egrep '(TXT|ANY)' | wc -l`
+nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | grep -E '(TXT|ANY)' | wc -l`
[ $nrecords -eq 18 ] || { ret=1; echo_i "found $nrecords records expected 18"; }
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "check the number of cached records remaining ($n)"
ret=0
dump_cache
-nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
+nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | grep -v '^;' | grep -E '(TXT|ANY)' | wc -l`
[ $nrecords -eq 17 ] || { ret=1; echo_i "found $nrecords records expected 17"; }
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "check the number of cached records remaining ($n)"
ret=0
dump_cache
-nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | egrep '(TXT|ANY)' | wc -l`
+nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | grep -E '(TXT|ANY)' | wc -l`
[ $nrecords -eq 1 ] || { ret=1; echo_i "found $nrecords records expected 1"; }
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
check_stderr() {
if [ -n "${err:=}" ]; then
- egrep "$err" err.$n >/dev/null && return 0
+ grep -E "$err" err.$n >/dev/null && return 0
echo_d "stderr did not match '$err'"
else
[ -s err.$n ] || return 0
nextpart "$file" | grep -F -e "$msg" > /dev/null
)
-# _search_log_re: same as _search_log but the message is an egrep regex
+# _search_log_re: same as _search_log but the message is an grep -E regex
_search_log_re() (
msg="$1"
file="$2"
return 1
)
-# wait_for_log_re: same as wait_for_log, but the message is an egrep regex
+# wait_for_log_re: same as wait_for_log, but the message is an grep -E regex
wait_for_log_re() (
timeout="$1"
msg="$2"
return 1
}
- out=`$DIG $DIGOPTS -t $type -q $host | egrep "^$host"`
+ out=`$DIG $DIGOPTS -t $type -q $host | grep -E "^$host"`
lines=`echo "$out" | grep "$digout" | wc -l`
[ $lines -eq 1 ] || {
[ "$should_fail" ] || \
zone="$1"
for i in 1 2 3 4 5 6 7 8 9 10
do
- if nextpart ns3/named.run | egrep "zone ${zone}.*(sending notifies|receive_secure_serial)" > /dev/null; then
+ if nextpart ns3/named.run | grep -E "zone ${zone}.*(sending notifies|receive_secure_serial)" > /dev/null; then
return
fi
sleep 1
ret=0
grep " $rolling"'$' sigs > /dev/null && ret=1
grep " $rolling"'$' keys > /dev/null || ret=1
-egrep "DS[ ]*$rolling[ ]" ${pfile}.signed > /dev/null || ret=1
+grep -E "DS[ ]*$rolling[ ]" ${pfile}.signed > /dev/null || ret=1
n=$((n + 1))
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
make_key () {
$RNDCCONFGEN -k key$1 -A $3 -s 10.53.0.4 -p $2 \
> ns4/key${1}.conf 2> /dev/null
- egrep -v '(^# Start|^# End|^# Use|^[^#])' ns4/key$1.conf | cut -c3- | \
+ grep -E -v '(^# Start|^# End|^# Use|^[^#])' ns4/key$1.conf | cut -c3- | \
sed 's/allow { 10.53.0.4/allow { any/' >> ns4/named.conf
}
# look for complaints from lib/dns/rpz.c and bin/name/query.c
for runfile in ns*/named.run; do
- EMSGS=`nextpart $runfile | egrep -l 'invalid rpz|rpz.*failed'`
+ EMSGS=`nextpart $runfile | grep -E -l 'invalid rpz|rpz.*failed'`
if test -n "$EMSGS"; then
setret "error messages in $runfile starting with:"
- egrep 'invalid rpz|rpz.*failed' ns*/named.run | \
+ grep -E 'invalid rpz|rpz.*failed' ns*/named.run | \
sed -e '10,$d' -e 's/^//' | cat_i
fi
done
# wait to the background mdig calls to complete.
wait
BAD=no
- ADDRS=`egrep "^$2$" mdig.out-$1 2>/dev/null | wc -l`
+ ADDRS=`grep -E "^$2$" mdig.out-$1 2>/dev/null | wc -l`
# count simple truncated and truncated NXDOMAIN as TC
- TC=`egrep "^TC|NXDOMAINTC$" mdig.out-$1 2>/dev/null | wc -l`
- DROP=`egrep "^drop$" mdig.out-$1 2>/dev/null | wc -l`
+ TC=`grep -E "^TC|NXDOMAINTC$" mdig.out-$1 2>/dev/null | wc -l`
+ DROP=`grep -E "^drop$" mdig.out-$1 2>/dev/null | wc -l`
# count NXDOMAIN and truncated NXDOMAIN as NXDOMAIN
- NXDOMAIN=`egrep "^NXDOMAIN|NXDOMAINTC$" mdig.out-$1 2>/dev/null | wc -l`
- SERVFAIL=`egrep "^SERVFAIL$" mdig.out-$1 2>/dev/null | wc -l`
- NOERROR=`egrep "^NOERROR$" mdig.out-$1 2>/dev/null | wc -l`
+ NXDOMAIN=`grep -E "^NXDOMAIN|NXDOMAINTC$" mdig.out-$1 2>/dev/null | wc -l`
+ SERVFAIL=`grep -E "^SERVFAIL$" mdig.out-$1 2>/dev/null | wc -l`
+ NOERROR=`grep -E "^NOERROR$" mdig.out-$1 2>/dev/null | wc -l`
range $ADDRS "$3" 1 ||
setret "$ADDRS instead of $3 '$2' responses for $1" &&
EOF
$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.2 | sed 1q | \
- egrep '10.53.0.(2|3)$' > test2.out &&
+ grep -E '10.53.0.(2|3)$' > test2.out &&
$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.3 | sed 1q | \
- egrep '10.53.0.(2|3)$' >> test2.out &&
+ grep -E '10.53.0.(2|3)$' >> test2.out &&
$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.4 | sed 1q | \
- egrep '10.53.0.4$' >> test2.out &&
+ grep -E '10.53.0.4$' >> test2.out &&
$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.5 | sed 1q | \
- egrep '10.53.0.5$' >> test2.out || status=1
+ grep -E '10.53.0.5$' >> test2.out || status=1
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1
return 1
}
- out=`$DIG $DIGOPTS -t $type -q $host | egrep "^${host}"`
+ out=`$DIG $DIGOPTS -t $type -q $host | grep -E "^${host}"`
lines=`echo "$out" | grep "$digout" | wc -l`
[ $lines -eq 1 ] || {
echo_i "dig output incorrect for $host $type $cmd: $out"