From fa76b9d61527b8f96c1f9f1e6b64ea7f63e8fb4a Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sat, 7 May 2022 00:36:42 +0200 Subject: [PATCH] Kindle: Fix retrieveNetworkInfo on the K4 (#9073) Thanks to @hius07 (https://github.com/koreader/koreader/issues/7881#issuecomment-1028921755) ;). Fix #7881 --- frontend/device/generic/device.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/device/generic/device.lua b/frontend/device/generic/device.lua index 80a206b69..4e7d04f49 100644 --- a/frontend/device/generic/device.lua +++ b/frontend/device/generic/device.lua @@ -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")