usr/bin/dnstcpbench
usr/bin/dnswasher
usr/bin/ixplore
+usr/bin/notify
usr/bin/nsec3dig
usr/bin/saxfr
usr/bin/sdig
export PDNS2=$PDNS
export SDIG=/usr/bin/sdig
export NSEC3DIG=/usr/bin/nsec3dig
+export NOTIFY=/usr/bin/notify
export SAXFR=/usr/bin/saxfr
export ZONE2SQL=/usr/bin/zone2sql
export PDNSUTIL=/usr/bin/pdnsutil
set -e
set -x
-PDNS=${PDNS:-../pdns/pdns_server}
-PDNS2=${PDNS2:-../pdns/pdns_server}
-
ALGORITHM=${ALGORITHM:="hmac-md5"}
KEY=${KEY:="kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys="}
if [ "$RUNWRAPPER" = "" ]; then
RUNWRAPPER="authbind"
fi
-MAKE=${MAKE:-make}
-
-$MAKE -C ../pdns notify > /dev/null
export ALGORITHM
export KEY
tosql ()
{
- ${MAKE} -C ../pdns zone2sql > /dev/null
- ../pdns/zone2sql --transactions --$1 --named-conf=./named.conf
+ ${ZONE2SQL} --transactions --$1 --named-conf=./named.conf
}
prepare()
UPDATE domains SET type = 'MASTER', notified_serial = NULL;
EOF
# setup tsig keys
- ../pdns/pdnsutil --config-name=gsqlite3-master --config-dir=. import-tsig-key tsig.com $ALGORITHM "$KEY"
- ../pdns/pdnsutil --config-name=gsqlite3-slave --config-dir=. import-tsig-key tsig.com $ALGORITHM "$KEY"
- ../pdns/zone2sql --transactions --gsqlite --zone=zones/example.com --zone-name=example.com | sqlite3 slave.db
+ $PDNSUTIL --config-name=gsqlite3-master --config-dir=. import-tsig-key tsig.com $ALGORITHM "$KEY"
+ $PDNSUTIL --config-name=gsqlite3-slave --config-dir=. import-tsig-key tsig.com $ALGORITHM "$KEY"
+ $ZONE2SQL --transactions --gsqlite --zone=zones/example.com --zone-name=example.com | sqlite3 slave.db
# setup supermaster
sqlite3 slave.db <<EOF
UPDATE domains SET type = 'SLAVE', master = '127.0.0.1' WHERE name = 'example.com';
EOF
# setup metadata on master
- ../pdns/pdnsutil --config-name=gsqlite3-master --config-dir=. set-meta example.com TSIG-ALLOW-AXFR tsig.com
- ../pdns/pdnsutil --config-name=gsqlite3-master --config-dir=. set-meta test.com TSIG-ALLOW-AXFR tsig.com
- ../pdns/pdnsutil --config-name=gsqlite3-slave --config-dir=. set-meta example.com AXFR-MASTER-TSIG tsig.com
+ $PDNSUTIL --config-name=gsqlite3-master --config-dir=. set-meta example.com TSIG-ALLOW-AXFR tsig.com
+ $PDNSUTIL --config-name=gsqlite3-master --config-dir=. set-meta test.com TSIG-ALLOW-AXFR tsig.com
+ $PDNSUTIL --config-name=gsqlite3-slave --config-dir=. set-meta example.com AXFR-MASTER-TSIG tsig.com
# i suppose we are done here...
}
EOF
# send notifications
-../pdns/pdns_control --config-dir=. --config-name=gsqlite3-master --socket-dir=. notify test.com
+$PDNSCONTROL --config-dir=. --config-name=gsqlite3-master --socket-dir=. notify test.com
sleep 2
# hopefully notifications have gone thru
done
# ensure unsigned notifications are refused
-../pdns/notify 127.0.0.2:53 test.com 2>&1
+$NOTIFY 127.0.0.2:53 test.com 2>&1
kill_process 0
set -e
set -x
-PDNS=${PDNS:-../pdns/pdns_server}
-PDNS2=${PDNS2:-../pdns/pdns_server}
if [ "$RUNWRAPPER" = "" ]; then
RUNWRAPPER="authbind"
fi
-MAKE=${MAKE:-make}
port=$1
[ -z "$port" ] && port=53
trap "kill_process 2" EXIT INT TERM
-$MAKE -C ../pdns notify > /dev/null
-
tosql ()
{
- ${MAKE} -C ../pdns zone2sql > /dev/null
- ../pdns/zone2sql --transactions --$1 --named-conf=./named.conf
+ $ZONE2SQL --transactions --$1 --named-conf=./named.conf
}
prepare()
sqlite3 master.db <<EOF
UPDATE domains SET type = 'MASTER', notified_serial = NULL;
EOF
- ../pdns/zone2sql --transactions --gsqlite --zone=zones/example.com --zone-name=example.com | sqlite3 slave.db
+ $ZONE2SQL --transactions --gsqlite --zone=zones/example.com --zone-name=example.com | sqlite3 slave.db
# setup supermaster
sqlite3 slave.db <<EOF
UPDATE domains SET type = 'SLAVE', master = '127.0.0.1' WHERE name = 'example.com';
EOF
# setup metadata on master
- ../pdns/pdnsutil --config-name=gsqlite3-master --config-dir=. set-meta example.com ALLOW-AXFR-FROM 127.0.0.2
- ../pdns/pdnsutil --config-name=gsqlite3-master --config-dir=. set-meta test.com ALLOW-AXFR-FROM 127.0.0.2
+ $PDNSUTIL --config-name=gsqlite3-master --config-dir=. set-meta example.com ALLOW-AXFR-FROM 127.0.0.2
+ $PDNSUTIL --config-name=gsqlite3-master --config-dir=. set-meta test.com ALLOW-AXFR-FROM 127.0.0.2
# i suppose we are done here...
}
EOF
# send notifications
-../pdns/pdns_control --config-dir=. --config-name=gsqlite3-master --socket-dir=. notify test.com
+$PDNSCONTROL --config-dir=. --config-name=gsqlite3-master --socket-dir=. notify test.com
sleep 2
# hopefully notifications have gone thru
export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server}
export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor}
export SDIG=${SDIG:-${PWD}/../pdns/sdig}
+export NOTIFY=${NOTIFY:-${PWD}/../pdns/notify}
export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig}
export SAXFR=${SAXFR:-${PWD}/../pdns/saxfr}
export ZONE2SQL=${ZONE2SQL:-${PWD}/../pdns/zone2sql}
spectest=$1
[ -z $spectest ] && spectest=""
-for prog in $SDIG $SAXFR $NSEC3DIG; do
+for prog in $SDIG $SAXFR $NOTIFY $NSEC3DIG; do
if `echo $prog | grep -q '../pdns'`; then
${MAKE} -C ../pdns ${prog##*../pdns/} || exit
fi
export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server}
export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor}
export SDIG=${SDIG:-${PWD}/../pdns/sdig}
+export NOTIFY=${NOTIFY:-${PWD}/../pdns/notify}
export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig}
export SAXFR=${SAXFR:-${PWD}/../pdns/saxfr}
export ZONE2SQL=${ZONE2SQL:-${PWD}/../pdns/zone2sql}
exit
fi
-for prog in $SDIG $SAXFR $NSEC3DIG; do
+for prog in $SDIG $SAXFR $NOTIFY $NSEC3DIG; do
if `echo $prog | grep -q '../pdns'`; then
${MAKE} -C ../pdns ${prog##*../pdns/} || exit
fi