X-Git-Url: https://git.openstreetmap.org/dns.git/blobdiff_plain/f940aa881391ea62e9622c7068255c612238743d..0d38c6ebf05e0daa26f116d8f8ee4494b47c1472:/bin/mkgeo diff --git a/bin/mkgeo b/bin/mkgeo index 2e0ac00..f23d0c5 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -294,7 +294,7 @@ if (defined($gdnsname)) my $continent = ""; $gdnsmapfile->print("${gdnsname} => {\n"); - $gdnsmapfile->print(" geoip2_db => /var/lib/GeoIP/GeoLite2-Country.mmdb\n"); + $gdnsmapfile->print(" geoip2_db => /usr/share/GeoIP/GeoLite2-Country.mmdb\n"); $gdnsmapfile->print(" datacenters => [" . join(",", sort(keys(%$clusters))) . "]\n"); $gdnsmapfile->print(" map => {\n"); $gdnsmapfile->print(" default => [" . join(",", sort(map { $_->{name} } grep { $_->{default} } values(%$clusters))) . "]\n"); @@ -331,8 +331,6 @@ if (defined($gdnsname)) { my $name = $cluster->{name}; - $gdnsresourcefile->print(" ${name} => ${name}.${zone}.\n"); - if (@{$cluster->{servers}} > 1) { $gdnsweightedfile->print("${name} => {\n"); @@ -349,6 +347,12 @@ if (defined($gdnsname)) } $gdnsweightedfile->print("}\n"); + + $gdnsresourcefile->print(" ${name} => %weighted!${name}\n"); + } + else + { + $gdnsresourcefile->print(" ${name} => ${name}.${zone}.\n"); } } @@ -524,7 +528,7 @@ sub output_server if ($server->{ipv6}) { -# $zonefile->printf("3${name}:$server->{ipv6}:600\n", $index + 1); + $zonefile->printf("3${name}:$server->{ipv6}:600\n", $index + 1); } } }