diff options
author | onefang | 2021-12-17 14:58:46 +1000 |
---|---|---|
committer | onefang | 2021-12-17 14:58:46 +1000 |
commit | fe8fc1dee06b74217d5a025707720553dd2a2368 (patch) | |
tree | 49155795c20ec1ba6f3656bb75c1aee60b5652bc /apt-panopticon.lua | |
parent | Don't crash if a DNS-RR mirror fails to resolve. (diff) | |
download | apt-panopticon-fe8fc1dee06b74217d5a025707720553dd2a2368.zip apt-panopticon-fe8fc1dee06b74217d5a025707720553dd2a2368.tar.gz apt-panopticon-fe8fc1dee06b74217d5a025707720553dd2a2368.tar.bz2 apt-panopticon-fe8fc1dee06b74217d5a025707720553dd2a2368.tar.xz |
Don't hard code deb.roundr.devuan.org all over the place, and check the results.
Coz it got changed to deb.rr.devuan.org.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index a524260..1a00fc7 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -199,11 +199,11 @@ gatherIPs = function (host) | |||
199 | gatherIPs(m.FQDN) | 199 | gatherIPs(m.FQDN) |
200 | IP[host][m.FQDN] = IP[m.FQDN] | 200 | IP[host][m.FQDN] = IP[m.FQDN] |
201 | -- Strip them out so we don't test them twice. | 201 | -- Strip them out so we don't test them twice. |
202 | if nil ~= IP[m.FQDN] then | 202 | if (nil ~= IP[m.FQDN]) and (nil ~= IP[host][APT.options.roundRobinCname]) then |
203 | for l, n in pairs(IP[m.FQDN]) do | 203 | for l, n in pairs(IP[m.FQDN]) do |
204 | if type(n) == 'table' then | 204 | if type(n) == 'table' then |
205 | for h, p in pairs(n) do | 205 | for h, p in pairs(n) do |
206 | for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do | 206 | for j, o in pairs(IP[host][APT.options.roundRobinCname]) do |
207 | if h == j then IP[host][m.FQDN][l][h] = nil end | 207 | if h == j then IP[host][m.FQDN][l][h] = nil end |
208 | end | 208 | end |
209 | o = 0 | 209 | o = 0 |
@@ -211,7 +211,7 @@ gatherIPs = function (host) | |||
211 | if 0 == o then IP[host][m.FQDN][l] = nil end | 211 | if 0 == o then IP[host][m.FQDN][l] = nil end |
212 | end | 212 | end |
213 | else | 213 | else |
214 | for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do | 214 | for j, o in pairs(IP[host][APT.options.roundRobinCname]) do |
215 | if l == j then IP[host][m.FQDN][l] = nil end | 215 | if l == j then IP[host][m.FQDN][l] = nil end |
216 | end | 216 | end |
217 | end | 217 | end |
@@ -1009,6 +1009,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1009 | 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to devuan.bio.lmu.de (141.84.43.19) port 80 (#0) | 1009 | 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to devuan.bio.lmu.de (141.84.43.19) port 80 (#0) |
1010 | curl: (22) The requested URL returned error: 404 Not Found | 1010 | curl: (22) The requested URL returned error: 404 Not Found |
1011 | ]] | 1011 | ]] |
1012 | local trace = {} | ||
1012 | local min, max, spd = 999999999999, 0 | 1013 | local min, max, spd = 999999999999, 0 |
1013 | local num = '[%d%.]+[kM]?' | 1014 | local num = '[%d%.]+[kM]?' |
1014 | if APT.checkFile(f) then | 1015 | if APT.checkFile(f) then |