]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace egrep with grep -E in rpz tests
authorTom Krizek <tkrizek@isc.org>
Thu, 6 Apr 2023 14:33:06 +0000 (16:33 +0200)
committerTom Krizek <tkrizek@isc.org>
Wed, 12 Apr 2023 11:32:46 +0000 (13:32 +0200)
GNU Grep 3.8 reports the following warnings:

    egrep: warning: egrep is obsolescent; using grep -E

bin/tests/system/rpz/tests.sh
bin/tests/system/rpzrecurse/tests.sh

index a18064d3d9acc6db3325dbe06ccd9b1534f34d26..dac6b6b5b26cf957cedf1bcb7cd98a1b706d2d30 100644 (file)
@@ -294,7 +294,7 @@ add_librpz_rule() {
 produce_librpz_rules() {
     # echo "Producing rules for $1"
     ZONEFILE=$1/$3.db
-    cat $ZONEFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
+    cat $ZONEFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
 }
 
 # $1=message
index aea2701954db8ef6ab1cfde7c22a21e9efb58b56..a5802bc0e2de3414b399557f5728ead22027da07 100644 (file)
@@ -66,13 +66,13 @@ start_server_rules() {
     cat $FCONF | grep 'zone ' | grep ' primary' | while read LINE; do
         ZONE=`echo $LINE | sed 's/.*zone "//g' | awk -F '"' '{print $1}'`;
         DBFILE=`echo $LINE | sed 's/.*file "//g' | awk -F '"' '{print $1}'`;
-        cat ns2/$DBFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$ZONE '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
+        cat ns2/$DBFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$ZONE '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
     done
 }
 
 produce_librpz_rules() {
     ZONEFILE=$1/$3.db
-    cat $ZONEFILE | egrep -v '^;' | egrep '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
+    cat $ZONEFILE | grep -E -v '^;' | grep -E '\<(A|CNAME)\>' | awk -v zone=$2 '{ if (NF == 4) {print "static add "$1"."zone" "$2" "$3" "$4} else if (NF == 3) {print "static add "$1"."zone" 300 "$2" "$3}}' >> $DNSRPS_TEST_UPDATE_FILE
 }
 
 run_query() {