patch for replica domains pointing at "nodns" domains
Wim Kerkhoff <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
Here's a small patch to prevent ISPMan from pointing a replica at a zone
file that doesn't exist, causing errors in the BIND logs.
Wim
myserver:/opt/cvs/ispman/lib# cvs diff -u dns.bind8.lib
Index: dns.bind8.lib
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/dns.bind8.lib,v
retrieving revision 1.20
diff -u -r1.20 dns.bind8.lib
--- dns.bind8.lib 4 Aug 2004 17:31:54 -0000 1.20
+++ dns.bind8.lib 23 May 2005 18:16:57 -0000
@@ -31,6 +31,16 @@
}
if ( $domaintype eq "replica" ) {
+ # BEGIN code by Wim Kerkhoff to skip a replica
if the primary is no-dns...
+ my $primaryName =
$domainInfo->{'ispmanReplicaMaster'};
+ my $primaryInfo =
$ispman->getDomainInfo($primaryName);
+ my $primaryType =
$primaryInfo->{'ispmanDomainType'};
+ logsay(" parent check: $primaryName/$primaryType");
+ if ($primaryType eq "nodns") {
+ logsay(" skipping over $domain because
it's primary($primaryName) is nodns");
+ next;
+ }
+ # END code
my $entry = PrimaryEntry(
$domain,
join( "/",
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click