aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-06-26 14:53:55 +1000
committeronefang2019-06-26 14:53:55 +1000
commit8c5baf96b0c674b3f6f9a42df72a05d0b8e58f84 (patch)
tree65b85f09f253a3119aba2b9324cbf5525c032d8d
parentRetry some of the HTTTP header downloads on certain errors, and report others. (diff)
downloadapt-panopticon-8c5baf96b0c674b3f6f9a42df72a05d0b8e58f84.zip
apt-panopticon-8c5baf96b0c674b3f6f9a42df72a05d0b8e58f84.tar.gz
apt-panopticon-8c5baf96b0c674b3f6f9a42df72a05d0b8e58f84.tar.bz2
apt-panopticon-8c5baf96b0c674b3f6f9a42df72a05d0b8e58f84.tar.xz
Change how the / at the end of the path is handled.
-rwxr-xr-xmirror-checker.lua14
1 files changed, 5 insertions, 9 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua
index 8b80e3f..eb82a32 100755
--- a/mirror-checker.lua
+++ b/mirror-checker.lua
@@ -232,15 +232,16 @@ end
232local checkPaths = function (host, ip, path) 232local checkPaths = function (host, ip, path)
233 I(" Checking IP " .. host .. " -> " .. ip .. " " .. path) 233 I(" Checking IP " .. host .. " -> " .. ip .. " " .. path)
234 for i, s in pairs(referenceDebs) do 234 for i, s in pairs(referenceDebs) do
235 if testing("http") then checkURL(host, "http://" .. ip .. path .. s) end 235 if testing("http") then checkURL(host, "http://" .. ip .. path .. "/" .. s) end
236 if testing("https") then checkURL(host, "https://" .. ip .. path .. s) end 236 if testing("https") then checkURL(host, "https://" .. ip .. path .. "/" .. s) end
237 end 237 end
238 238
239 for i, s in pairs(releases) do 239 for i, s in pairs(releases) do
240 for j, k in pairs(releaseFiles) do 240 for j, k in pairs(releaseFiles) do
241 if testing("http") then checkURL(host, "http://" .. ip .. path .. "merged/dists/" .. s .. k) end
242 if testing("https") then checkURL(host, "https://" .. ip .. path .. "merged/dists/" .. s .. k) end
243 if repoExists(s .. k) then 241 if repoExists(s .. k) then
242 if testing("http") then checkURL(host, "http://" .. ip .. path .. "/merged/dists/" .. s .. k) end
243 if testing("https") then checkURL(host, "https://" .. ip .. path .. "/merged/dists/" .. s .. k) end
244 end
244 end 245 end
245 end 246 end
246end 247end
@@ -284,11 +285,6 @@ checkIP = function (orig, host, path, ip)
284 end 285 end
285end 286end
286 287
287local checkHost = function (host, path, ip)
288 if nil == path then path = "/" else
289 checkIP(host, host, path, ip)
290end
291
292local downloads = function (cut, host, URL) 288local downloads = function (cut, host, URL)
293 if 0 ~= cut then cd = " --cut-dirs=" .. cut .. " " else cd = "" end 289 if 0 ~= cut then cd = " --cut-dirs=" .. cut .. " " else cd = "" end
294 if nil == URL then URL = "/" end 290 if nil == URL then URL = "/" end