]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mkgeo
Don't write an entry to the weighted lookup when all servers are down
[dns.git] / bin / mkgeo
index 8cb4687e124fca590eece9372e4d28d55d7a74fa..0b38881a65bc6287606baa87274ce639d6d1d46b 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -339,7 +339,7 @@ if (defined($gdnsname))
     {
         my $name = $cluster->{name};
 
-        if (@{$cluster->{servers}} > 1)
+        if (@{$cluster->{servers}} > 1 && grep { $_->{status} eq "up" } @{$cluster->{servers}})
         {
             $gdnsweightedfile->print("${name} => {\n");