aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticommon.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apt-panopticommon.lua')
-rw-r--r--apt-panopticommon.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua
index e40ec0a..7664297 100644
--- a/apt-panopticommon.lua
+++ b/apt-panopticommon.lua
@@ -23,6 +23,7 @@ APT.verbosity = -1
23APT.origin = false 23APT.origin = false
24APT.redir = false 24APT.redir = false
25APT.keep = false 25APT.keep = false
26APT.IPv46 = ''
26 27
27APT.options = 28APT.options =
28{ 29{
@@ -119,6 +120,10 @@ APT.parseArgs = function(args)
119 APT.args = args 120 APT.args = args
120 local arg = {} 121 local arg = {}
121 local sendArgs = "" 122 local sendArgs = ""
123 -- A special test to disable IPv6 tests if IPv6 isn't available.
124 if 1 == APT.exe('ip -6 addr | grep inet6 | grep " global"'):Do().status then
125 table.insert(args, '--tests=-IPv6')
126 end
122 if 0 ~= #(args) then 127 if 0 ~= #(args) then
123 local option = "" 128 local option = ""
124 for i, a in pairs(args) do 129 for i, a in pairs(args) do
@@ -132,6 +137,9 @@ APT.parseArgs = function(args)
132 elseif "-q" == a then 137 elseif "-q" == a then
133 APT.verbosity = -1 138 APT.verbosity = -1
134 sendArgs = sendArgs .. a .. " " 139 sendArgs = sendArgs .. a .. " "
140 elseif ("-4" == a) or ("-6" == a) then
141 APT.IPv46 = a
142 sendArgs = sendArgs .. a .. " "
135 elseif "-k" == a then 143 elseif "-k" == a then
136 APT.keep = true 144 APT.keep = true
137 sendArgs = sendArgs .. a .. " " 145 sendArgs = sendArgs .. a .. " "