- Timestamp:
- 10/04/22 17:08:17 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB/ExportBIND.pm
r873 r874 117 117 my (@zsoa) = $soasth->fetchrow_array(); 118 118 ##fixme: do we even need @loclist passed in? 119 publishrec_bind(\%zonefiles, \@loclist, $zsoa[7], 'y', \%recflags, $ revzone,119 publishrec_bind(\%zonefiles, \@loclist, $zsoa[7], 'y', \%recflags, $cidr, 120 120 $zsoa[0], $zsoa[1], $zsoa[2], $zsoa[3], $zsoa[4], $zsoa[5], $zsoa[6], $loc, ''); 121 121 } # if force_refresh etc … … 217 217 $zonesth = $dnsdb->{dbh}->prepare("UPDATE domains SET changed='n' WHERE domain_id=?"); 218 218 $domsth->execute(); 219 220 # Clear %reclfags, since we explicitly want to NOT carry "I've published this 221 # record" over from rDNS, since we have to regenerate any templates for forward 222 # zones. downside: small mismatches due to overridden entries. not sure how 223 # best to manage that. :/ 224 ##fixme: selectively delete entries to allow template_always_publish_a to flag 225 # whether extra A records get published or not. should default to not (nb, of 226 # *course* that's the complex case) to match original tinydns template masking behaviour 227 # %recflags = (); 219 228 220 229 while (my ($domid,$dom,$domstat,$changed) = $domsth->fetchrow_array) { … … 318 327 319 328 } # while ($recsth) 329 330 # retrieve NS records for subdomains. not strictly required in current production 331 # context but may matter sometime down the road 332 my $subnssth = $dnsdb->{dbh}->prepare("SELECT r.host,r.val,r.ttl,r.record_id,r.loc,r.stamp,r.expires,r.stampactive ". 333 "FROM records r ". 334 "JOIN domains d ON r.domain_id=d.domain_id ". 335 "WHERE r.type=2 AND d.domain LIKE ?"); 336 $subnssth->execute('%.'.$dom); 337 while (my ($host,$val,$ttl,$recid,$loc,$stamp,$expires,$stampactive) = $subnssth->fetchrow_array) { 338 printrec_bind(\%zonefiles, \@loclist, $recid, 'n', \%recflags, $dom, 339 $host, 2, $val, '', '', '', $ttl, $loc, $stamp, $expires, $stampactive); 340 } # subdomain-ns-recsth 320 341 321 342
Note:
See TracChangeset
for help on using the changeset viewer.