mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Kindle: Fix retrieveNetworkInfo on the K4 (#9073)
Thanks to @hius07 (https://github.com/koreader/koreader/issues/7881#issuecomment-1028921755) ;). Fix #7881
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user