Changeset 565
- Timestamp:
- 12/19/13 16:27:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r561 r565 3498 3498 3499 3499 eval { 3500 my $sql = "UPDATE "._rectable($defrec, $revrec)." SET host=?, val=?, ttl=? WHERE record_id=? AND type=6"; 3501 $dbh->do($sql, undef, ("$soa{contact}:$soa{prins}", "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", 3500 if (!$oldsoa) { 3501 # old SOA record is missing for some reason. create a new one. 3502 my $sql = "INSERT INTO "._rectable($defrec, $revrec)." (group_id, host, type, val, ttl) VALUES (?,?,6,?,?)"; 3503 $dbh->do($sql, undef, ($soa{id}, "$soa{contact}:$soa{prins}", 3504 "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", $soa{ttl}) ); 3505 $msg = ($defrec eq 'y' ? ($revrec eq 'y' ? 'Default reverse ' : 'Default ') : ''). 3506 "SOA missing for $parname; added (ns $soa{prins}, contact $soa{contact}, refresh $soa{refresh},". 3507 " retry $soa{retry}, expire $soa{expire}, minTTL $soa{minttl}, TTL $soa{ttl})"; 3508 } else { 3509 my $sql = "UPDATE "._rectable($defrec, $revrec)." SET host=?, val=?, ttl=? WHERE record_id=? AND type=6"; 3510 $dbh->do($sql, undef, ("$soa{contact}:$soa{prins}", "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", 3502 3511 $soa{ttl}, $oldsoa->{record_id}) ); 3503 $msg = "Updated ".($defrec eq 'y' ? ($revrec eq 'y' ? 'default reverse ' : 'default ') : '').3512 $msg = "Updated ".($defrec eq 'y' ? ($revrec eq 'y' ? 'default reverse ' : 'default ') : ''). 3504 3513 "SOA for $parname: ". 3505 3514 "(ns $oldsoa->{prins}, contact $oldsoa->{contact}, refresh $oldsoa->{refresh},". … … 3507 3516 "(ns $soa{prins}, contact $soa{contact}, refresh $soa{refresh},". 3508 3517 " retry $soa{retry}, expire $soa{expire}, minTTL $soa{minttl}, TTL $soa{ttl})"; 3509 3518 } 3510 3519 $logdata{entry} = $msg; 3511 3520 $self->_log(%logdata);
Note:
See TracChangeset
for help on using the changeset viewer.