- Timestamp:
- 08/10/12 16:06:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tiny-import.pl
r375 r380 409 409 if ($zone =~ /\.arpa$/) { 410 410 ($code,$msg) = DNSDB::_zone2cidr($zone); 411 $dbh->do("INSERT INTO revzones (revnet,group_id,status) VALUES (?,1,1)", undef, ($msg)); 411 $dbh->do("INSERT INTO revzones (revnet,group_id,status,default_location) VALUES (?,1,1,?)", 412 undef, ($msg, $loc)); 412 413 my ($rdns) = $dbh->selectrow_array("SELECT currval('revzones_rdns_id_seq')"); 413 414 $recsth->execute(0, $rdns, "$contact:$master", 6, "$refresh:$retry:$expire:$minttl", 0, 0, 0, $ttl, $loc); 414 415 } else { 415 $dbh->do("INSERT INTO domains (domain,group_id,status) VALUES (?,1,1)", undef, ($zone)); 416 $dbh->do("INSERT INTO domains (domain,group_id,status,default_location) VALUES (?,1,1,?)", 417 undef, ($zone, $loc)); 416 418 my ($domid) = $dbh->selectrow_array("SELECT currval('domains_domain_id_seq')"); 417 419 $recsth->execute($domid, 0, "$contact:$master", 6, "$refresh:$retry:$expire:$minttl", 0, 0, 0, $ttl, $loc); … … 489 491 if (!$rdns) { 490 492 $errstr = "adding revzone $msg"; 491 $dbh->do("INSERT INTO revzones (revnet,group_id,status) VALUES (?,1,1)", undef, ($msg)); 493 $dbh->do("INSERT INTO revzones (revnet,group_id,status,default_location) VALUES (?,1,1,?)", 494 undef, ($msg, $loc)); 492 495 ($rdns) = $dbh->selectrow_array("SELECT currval('revzones_rdns_id_seq')"); 493 496 # this would probably make a lot more sense to do hostmaster.$config{admindomain} … … 508 511 if (!$domid) { 509 512 $errstr = "adding domain $fqdn"; 510 $dbh->do("INSERT INTO domains (domain,group_id,status) VALUES (?,1,1)", undef, ($fqdn)); 513 $dbh->do("INSERT INTO domains (domain,group_id,status,default_location) VALUES (?,1,1,?)", 514 undef, ($fqdn, $loc)); 511 515 ($domid) = $dbh->selectrow_array("SELECT currval('domains_domain_id_seq')"); 512 516 $recsth->execute($domid, 0, "hostmaster.$fqdn:$ns", 6, "16384:2048:1048576:2560", 0, 0, 0, "2560", $loc);
Note:
See TracChangeset
for help on using the changeset viewer.