diff options
-rw-r--r-- | apt-panopticommon.lua | 5 | ||||
-rwxr-xr-x | apt-panopticon.lua | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index 7664297..ffc3af4 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua | |||
@@ -671,6 +671,7 @@ APT.collateAll = function(hosts, l, host, func) | |||
671 | results = loadfile(f)() | 671 | results = loadfile(f)() |
672 | results = APT.padResults(results) | 672 | results = APT.padResults(results) |
673 | if nil ~= func then func(results) end | 673 | if nil ~= func then func(results) end |
674 | results = APT.collate(l, host, 'R', results) | ||
674 | local v = hosts[host] | 675 | local v = hosts[host] |
675 | if nil ~= v then | 676 | if nil ~= v then |
676 | local IPs = results.IPs | 677 | local IPs = results.IPs |
@@ -679,16 +680,18 @@ APT.collateAll = function(hosts, l, host, func) | |||
679 | if "table" == type(u) then | 680 | if "table" == type(u) then |
680 | for h, t in pairs(u) do | 681 | for h, t in pairs(u) do |
681 | results = APT.collate(l, host, h, results) | 682 | results = APT.collate(l, host, h, results) |
683 | results = APT.collate(l, host, h .. '_R', results) | ||
682 | if nil ~= func then func(results, h) end | 684 | if nil ~= func then func(results, h) end |
683 | end | 685 | end |
684 | else | 686 | else |
685 | results = APT.collate(l, host, i, results) | 687 | results = APT.collate(l, host, i .. '_R', results) |
686 | if nil ~= func then func(results, i) end | 688 | if nil ~= func then func(results, i) end |
687 | end | 689 | end |
688 | end | 690 | end |
689 | end | 691 | end |
690 | end | 692 | end |
691 | end | 693 | end |
694 | results = APT.padResults(results) | ||
692 | return results | 695 | return results |
693 | end | 696 | end |
694 | 697 | ||
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 52e11eb..6558474 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1127,7 +1127,8 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1127 | local srvs = io.popen('ls -1 results/*.lua') | 1127 | local srvs = io.popen('ls -1 results/*.lua') |
1128 | for l in srvs:lines() do | 1128 | for l in srvs:lines() do |
1129 | local hst = l:sub(9, -5) | 1129 | local hst = l:sub(9, -5) |
1130 | if (l:find('_') == nil) and (nil == APT.mirrors[hst]) then | 1130 | if nil ~= l:find('_R%.lua') then hst = hst:sub(1, -3) end |
1131 | if (hst:find('_') == nil) and (nil == APT.mirrors[hst]) then | ||
1131 | local ips = loadfile(l)().IPs | 1132 | local ips = loadfile(l)().IPs |
1132 | if nil ~= ips then | 1133 | if nil ~= ips then |
1133 | debians[hst] = {Country = '', FDQN = hst, Active = 'yes', Rate = '', BaseURL = hst, Protocols = {http = true, https = true}, Bandwidth = '', IPs = ips} | 1134 | debians[hst] = {Country = '', FDQN = hst, Active = 'yes', Rate = '', BaseURL = hst, Protocols = {http = true, https = true}, Bandwidth = '', IPs = ips} |