Kindle: Fix retrieveNetworkInfo on the K4 (#9073)

Thanks to @hius07
(https://github.com/koreader/koreader/issues/7881#issuecomment-1028921755)
;).

Fix #7881
reviewable/pr9075/r1
NiLuJe 2 years ago committed by GitHub
parent f286787ff5
commit fa76b9d615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -482,9 +482,9 @@ function Device:retrieveNetworkInfo()
std_out:close()
end
if os.execute("ip r | grep -q default") == 0 then
-- NOTE: No -w flag available in the old busybox build used on Legacy Kindles...
-- NOTE: No -w flag available in the old busybox build used on Legacy Kindles (K4 included)...
local pingok
if self:isKindle() and self:hasKeyboard() then
if self:isKindle() and self:hasDPad() then
pingok = os.execute("ping -q -c 2 `ip r | grep default | tail -n 1 | cut -d ' ' -f 3` > /dev/null")
else
pingok = os.execute("ping -q -w 3 -c 2 `ip r | grep default | tail -n 1 | cut -d ' ' -f 3` > /dev/null")

Loading…
Cancel
Save