From: Peter van Dijk Date: Mon, 12 Oct 2015 20:09:19 +0000 (+0200) Subject: avoid GNUism to improve OSX portability X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=322bd8cdc37859b7203ec890169e8acbb95bdf3c;p=pdns avoid GNUism to improve OSX portability --- diff --git a/regression-tests/backends/gmysql-slave b/regression-tests/backends/gmysql-slave index de86ebe36..3c6b6a26b 100644 --- a/regression-tests/backends/gmysql-slave +++ b/regression-tests/backends/gmysql-slave @@ -25,7 +25,7 @@ __EOF__ echo "gmysql-dnssec" >> pdns-gmysql2.conf fi - for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | tac) + for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | perl -e 'print reverse ') do mysql --user="$GMYSQL2USER" --password="$GMYSQL2PASSWD" --host="$GMYSQL2HOST" \ "$GMYSQL2DB" -e "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port')" diff --git a/regression-tests/backends/goracle-slave b/regression-tests/backends/goracle-slave index c57857e1e..ab914d425 100644 --- a/regression-tests/backends/goracle-slave +++ b/regression-tests/backends/goracle-slave @@ -25,7 +25,7 @@ __EOF__ echo "goracle-dnssec" >> pdns-goracle2.conf fi - for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | tac) + for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | perl -e 'print reverse ') do echo "INSERT INTO domains (id, name, type, master) VALUES(domains_id_sequence.nextval, '$zone', 'SLAVE', '127.0.0.1:$port');" | sqlplus -S $GORACLE2USER/$GORACLE2PASSWD@xe >> goracle2.log done diff --git a/regression-tests/backends/gpgsql-slave b/regression-tests/backends/gpgsql-slave index 734d95dee..4dd6e85db 100644 --- a/regression-tests/backends/gpgsql-slave +++ b/regression-tests/backends/gpgsql-slave @@ -18,7 +18,7 @@ __EOF__ echo "gpgsql-dnssec" >> pdns-gpgsql2.conf fi - for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | tac) + for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | perl -e 'print reverse ') do psql --user="$GPGSQL2USER" \ -c "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port')" \ diff --git a/regression-tests/backends/gsqlite3-slave b/regression-tests/backends/gsqlite3-slave index 623e55ffc..5b2060b63 100644 --- a/regression-tests/backends/gsqlite3-slave +++ b/regression-tests/backends/gsqlite3-slave @@ -14,7 +14,7 @@ __EOF__ echo "gsqlite3-dnssec" >> pdns-gsqlite32.conf fi - for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | tac) + for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | perl -e 'print reverse ') do sqlite3 pdns.sqlite32 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');" done diff --git a/regression-tests/backends/oracle-slave b/regression-tests/backends/oracle-slave index 7be44eb9c..15c1aa7cd 100644 --- a/regression-tests/backends/oracle-slave +++ b/regression-tests/backends/oracle-slave @@ -21,7 +21,7 @@ oracle-master-password=$ORACLE2PASSWD oracle-dnssec __EOF__ - for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | tac) + for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | perl -e 'print reverse ') do echo "INSERT ALL INTO zones (id, name, type) VALUES (zones_id_seq.nextval, name, 'SLAVE') INTO zonemasters (zone_id, master) VALUES (zones_id_seq.nextval, master) SELECT '$zone' AS name, '127.0.0.1:$port' AS master FROM dual;" | sqlplus -S $ORACLE2USER/$ORACLE2PASSWD@xe >> oracle2.log done