aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-24 19:33:27 +1000
committeronefang2019-12-24 19:33:27 +1000
commitd7ebcf2ef20dc356cbea2c070cd9eca2d9abaaf0 (patch)
tree7ed10179c5ce15dec20098f5d9d03b273bb9e9cc
parentRearrange the package selection, Devuan first, security second. (diff)
downloadapt-panopticon-d7ebcf2ef20dc356cbea2c070cd9eca2d9abaaf0.zip
apt-panopticon-d7ebcf2ef20dc356cbea2c070cd9eca2d9abaaf0.tar.gz
apt-panopticon-d7ebcf2ef20dc356cbea2c070cd9eca2d9abaaf0.tar.bz2
apt-panopticon-d7ebcf2ef20dc356cbea2c070cd9eca2d9abaaf0.tar.xz
Slightly better forking and testing for redirection.
-rwxr-xr-xapt-panopticon.lua32
1 files changed, 17 insertions, 15 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 49f7f6d..45a591f 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -934,26 +934,28 @@ if 0 < #arg then
934 if nil ~= arg[3] then I(" Using file " .. arg[3]); end 934 if nil ~= arg[3] then I(" Using file " .. arg[3]); end
935 APT.results = APT.padResults(APT.results) 935 APT.results = APT.padResults(APT.results)
936 936
937 if APT.origin or APT.redir then 937 if APT.origin then
938 local file = arg[3] 938 local file = arg[3]
939 if nil == file then file = '' end 939 if nil == file then file = '' end
940 local path = pu.path 940 local path = pu.path
941 if nil == path then path = '' end 941 if nil == path then path = '' end
942 local ips = APT.results["IPs"] 942 if APT.origin then
943 for k, v in pairs(ips) do 943 local ips = APT.results["IPs"]
944 if "table" == type(v) then 944 for k, v in pairs(ips) do
945 for k1, v1 in pairs(v) do 945 if "table" == type(v) then
946 if v1 == "A" then 946 for k1, v1 in pairs(v) do
947 if APT.testing("IPv4") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k1 .. " " .. file) end 947 if v1 == "A" then
948 elseif v1 == "AAAA" then 948 if APT.testing("IPv4") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k1 .. " " .. file) end
949 if APT.testing("IPv6") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k1 .. " " .. file) end 949 elseif v1 == "AAAA" then
950 if APT.testing("IPv6") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k1 .. " " .. file) end
951 end
952 end
953 else
954 if v == "A" then
955 if APT.testing("IPv4") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file) end
956 elseif v == "AAAA" then
957 if APT.testing("IPv6") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file) end
950 end 958 end
951 end
952 else
953 if v == "A" then
954 if APT.testing("IPv4") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file) end
955 elseif v == "AAAA" then
956 if APT.testing("IPv6") then APT.fork("ionice -c3 ./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file) end
957 end 959 end
958 end 960 end
959 end 961 end