rmass_doing=Adding record to zone $1 ..
rmass_done=.. done
rmass_eclash=.. a record with the same name and value $1 already exists.
+rmass_eclash2=.. a record with the same name and the same value $1 already exists.
rmass_clash=Create even if record already exists?
check_title=Check Records
$in{'name'}.".".$zi->{'name'}.".";
@recs = &read_zone_file($zi->{'file'}, $zi->{'name'});
if ($in{'type'} eq 'CNAME' || $in{'clash'}) {
+ # Check if a record with the same name exists
($clash) = grep { $_->{'name'} eq $fullname &&
$_->{'type'} eq $in{'type'} } @recs;
if ($clash) {
next;
}
}
+ # Check if a record with the same name and value exists
+ ($clash) = grep { $_->{'name'} eq $fullname &&
+ $_->{'type'} eq $in{'type'} &&
+ join(" ", @{$_->{'values'}} eq $in{'value'} } @recs;
+ if ($clash) {
+ print &text('rmass_eclash2',
+ "<tt>".join(" ", @{$clash->{'values'}})."</tt>"),"<p>\n";
+ next;
+ }
&create_record($zi->{'file'}, $in{'name'}, $in{'ttl'}, "IN",
$in{'type'}, $in{'value'});
&bump_soa_record($zi->{'file'}, \@recs);