1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
$NetBSD: patch-ab,v 1.1 2000/11/22 10:44:52 rh Exp $
--- ispman-utils/bin/ldap2named.orig Sat Sep 23 01:24:28 2000
+++ ispman-utils/bin/ldap2named
@@ -31,7 +31,10 @@
if ($soa) {
- print ZONE "@ IN SOA $soa->{'primary'}. $soa->{'rootmail'}. (\n";
+ my $primary = $soa->{'primary'};
+ $primary="$primary\." if (($primary =~ /\./) && ($primary !~ /\.$/));
+ print ZONE "\$TTL $soa->{'minimum'}\n";
+ print ZONE "@ IN SOA $primary $soa->{'rootmail'}. (\n";
for (qw(serial refresh retry expire minimum)) {
print ZONE "\t $soa->{$_} ; $_\n";
}
@@ -45,7 +48,7 @@
print ZONE "\n; NS RECORDS\n";
for (@$nsrecords) {
my ($origion, $host)=split(/\s*,\s*/, $_);
- $host=($host=~/\.$/)?$host: "$host\.";
+ $host="$host\." if (($host =~ /\./) && ($host !~ /\.$/));
print ZONE "$origion IN NS $host\n";
}
@@ -55,7 +58,7 @@
for (@$mxrecords) {
my ($origion, ,$pref, $host)=split(/\s*,\s*/, $_);
- $host=($host=~/\.$/)?$host: "$host\.";
+ $host="$host\." if (($host =~ /\./) && ($host !~ /\.$/));
print ZONE "$origion IN MX $pref $host\n";
}
@@ -72,6 +75,7 @@
my $cnames=$ispman->getRecords($domains->{$domain}, "cnames");
for (@$cnames) {
my ($alias, $host)=split(/\s*,\s*/, $_);
+ $host="$host\." if (($host =~ /\./) && ($host !~ /\.$/));
print ZONE "$alias IN CNAME $host\n";
}
|