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 <STDIN>')
do
mysql --user="$GMYSQL2USER" --password="$GMYSQL2PASSWD" --host="$GMYSQL2HOST" \
"$GMYSQL2DB" -e "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port')"
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 <STDIN>')
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
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 <STDIN>')
do
psql --user="$GPGSQL2USER" \
-c "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port')" \
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 <STDIN>')
do
sqlite3 pdns.sqlite32 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');"
done
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 <STDIN>')
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