From e32ab0cf0f3494dee6121cfe7335b56250b84dcc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 12 Aug 2013 17:48:49 +0100 Subject: [PATCH] Point render.osm.org at whichever rendering servers are available --- bin/mkgeo | 16 +++++++++++++--- src/render.openstreetmap | 2 ++ src/tile.openstreetmap | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/mkgeo b/bin/mkgeo index f726668..33a05b0 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -217,13 +217,23 @@ foreach my $origin (values %$origins) $targetorigins->{$cluster->{name}}->{bandwidth} += $origin->{bandwidth}; } +# Header for default records +$zonefile->print("# Unknown origins\n"); + # Output default records for IPs that can't be mapped to a country -foreach my $cluster (grep { $clusters->{$_}->{default} } keys %$clusters) +while (my($name,$cluster) = each %$clusters) { - $zonefile->print("# Unknown origins\n"); - $zonefile->print("Cxx.${zone}:${cluster}.${zone}:600\n"); + if (my $default = $cluster->{default}) + { + $zonefile->print("C${default}.${zone}:${name}.${zone}:600\n"); + } + elsif (exists($cluster->{default})) + { + $zonefile->print("C${zone}:${name}.${zone}:600\n"); + } } +# Header for underlying servers $zonefile->print("# Servers\n"); # Output A records for each cluster diff --git a/src/render.openstreetmap b/src/render.openstreetmap index 70764c1..08a7210 100644 --- a/src/render.openstreetmap +++ b/src/render.openstreetmap @@ -6,6 +6,7 @@ orm: bandwidth: 500 ipv4: 193.63.75.98 ipv6: 200106300012050002e081fffec52a8c + default: "" yevaud: lat: 51.507222 @@ -14,6 +15,7 @@ yevaud: colour: "#412c84" bandwidth: 250 ipv4: 128.40.168.104 + default: "" # Spare colours: # diff --git a/src/tile.openstreetmap b/src/tile.openstreetmap index fb587df..7aebfc9 100644 --- a/src/tile.openstreetmap +++ b/src/tile.openstreetmap @@ -71,7 +71,7 @@ amsterdam: colour: "#a1b92e" bandwidth: 50 ipv4: 134.90.146.26 - default: true + default: "xx" # Oslo, NO # BW Limit: 1000Mb/s -- 2.39.5