argh
This commit is contained in:
parent
2c36ea4742
commit
a5fa2c5b07
67 changed files with 7142 additions and 14 deletions
41
bin/_old/old/dnsnotify
Executable file
41
bin/_old/old/dnsnotify
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# usage: dnsnotify zone slave [...]
|
||||
# example: dnsnotify example.org 1.2.3.4 1.2.3.5
|
||||
|
||||
use Net::DNS;
|
||||
|
||||
$zone = shift;
|
||||
@master_ns = @ARGV;
|
||||
|
||||
$res = new Net::DNS::Resolver;
|
||||
|
||||
foreach $ns (@master_ns) {
|
||||
$packet = new Net::DNS::Packet($zone, "SOA", "IN");
|
||||
die unless defined $packet;
|
||||
|
||||
($packet->header)->opcode("NS_NOTIFY_OP");
|
||||
($packet->header)->rd(0);
|
||||
($packet->header)->aa(1);
|
||||
|
||||
$res->nameservers($ns);
|
||||
|
||||
# Prints outgoing packet - the NOTIFY
|
||||
# $packet->print;
|
||||
|
||||
$reply = $res->send($packet);
|
||||
|
||||
if (defined $reply) {
|
||||
|
||||
print "Received NOTIFY answer from " . $reply->answerfrom . "\n";
|
||||
# Print received packet - the answer
|
||||
# $reply->print;
|
||||
|
||||
} else {
|
||||
|
||||
warn "\$res->send indicates NOTIFY error for $ns\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue