diff options
Diffstat (limited to '')
-rwxr-xr-x | mirror-checker.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua index 6580190..3da8bc6 100755 --- a/mirror-checker.lua +++ b/mirror-checker.lua | |||
@@ -443,6 +443,9 @@ local getMirrors = function () | |||
443 | mirrors[host] = m | 443 | mirrors[host] = m |
444 | end | 444 | end |
445 | end | 445 | end |
446 | mirrors[options.roundRobin.value] = { ["Protocols"] = { ["http"] = true; ["https"] = true; }; ["FQDN"] = 'deb.devuan.org'; ["Active"] = 'yes'; ["BaseURL"] = 'deb.devuan.org'; } | ||
447 | gatherIPs(options.roundRobin.value) | ||
448 | mirrors[options.roundRobin.value].IPs = IP[options.roundRobin.value] | ||
446 | local file, e = io.open("results/mirrors.lua", "w+") | 449 | local file, e = io.open("results/mirrors.lua", "w+") |
447 | if nil == file then C("opening mirrors file - " .. e) else | 450 | if nil == file then C("opening mirrors file - " .. e) else |
448 | file:write(dumpTable(mirrors, "", "mirrors") .. "\nreturn mirrors\n") | 451 | file:write(dumpTable(mirrors, "", "mirrors") .. "\nreturn mirrors\n") |
@@ -575,9 +578,7 @@ else | |||
575 | I("Starting tests " .. table.concat(options.tests.value, ", ")) | 578 | I("Starting tests " .. table.concat(options.tests.value, ", ")) |
576 | execute("mkdir -p results") | 579 | execute("mkdir -p results") |
577 | mirrors = getMirrors() | 580 | mirrors = getMirrors() |
578 | mirrors[options.referenceSite.value] = nil | ||
579 | checkHost(options.referenceSite.value) | 581 | checkHost(options.referenceSite.value) |
580 | checkHost("deb.devuan.org") | ||
581 | for k, m in pairs(mirrors) do | 582 | for k, m in pairs(mirrors) do |
582 | if "/" == m.BaseURL:sub(-1, -1) then | 583 | if "/" == m.BaseURL:sub(-1, -1) then |
583 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) | 584 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) |
@@ -588,9 +589,11 @@ else | |||
588 | m.BaseURL = m.BaseURL:sub(1, -2) | 589 | m.BaseURL = m.BaseURL:sub(1, -2) |
589 | end | 590 | end |
590 | local pu = url.parse("http://" .. m.BaseURL) | 591 | local pu = url.parse("http://" .. m.BaseURL) |
591 | checkHost(m.BaseURL) | 592 | if options.referenceSite.value ~= pu.host then |
592 | checkExes("mirror-checker.lua " .. sendArgs) | 593 | checkHost(m.BaseURL) |
593 | if testing("Integrity") or testing("Updated") then checkExes(downloadLock) end | 594 | checkExes("mirror-checker.lua " .. sendArgs) |
595 | if testing("Integrity") or testing("Updated") then checkExes(downloadLock) end | ||
596 | end | ||
594 | end | 597 | end |
595 | while 1 <= checkExes("mirror-checker.lua " .. sendArgs) do os.execute("sleep 10") end | 598 | while 1 <= checkExes("mirror-checker.lua " .. sendArgs) do os.execute("sleep 10") end |
596 | if testing("Integrity") or testing("Updated") then | 599 | if testing("Integrity") or testing("Updated") then |