fix ota update for PocketBook

pull/1394/head
chrox 9 years ago
parent 917f45a5ba
commit c11a2bbf1e

@ -210,6 +210,9 @@ pbupdate: all
$(INSTALL_DIR)/applications/koreader/ota/package.index
echo "applications/koreader/ota/package.index" >> \
$(INSTALL_DIR)/applications/koreader/ota/package.index
# hack file path when running tar in parent directory of koreader
sed -i -e 's/^/..\//' \
$(INSTALL_DIR)/applications/koreader/ota/package.index
# update index file in zip package
cd $(INSTALL_DIR) && zip -u ../koreader-pocketbook-$(MACHINE)-$(VERSION).zip \
applications/koreader/ota/package.index

@ -5,7 +5,7 @@ local _ = require("gettext")
local common_info = {}
if Device:isKindle() or Device:isKobo() then
if Device:isKindle() or Device:isKobo() or Device:isPocketBook() then
local OTAManager = require("ui/otamanager")
table.insert(common_info, OTAManager:getOTAMenuTable())
end

@ -73,17 +73,8 @@ function NetworkMgr:promptWifiOff()
end
function NetworkMgr:getWifiStatus()
local default_string = io.popen("ip r | grep default")
if not default_string then return false end
local result = default_string:read()
default_string:close()
if result ~= nil then
local gateway = string.match(result,"%d+.%d+.%d+.%d+")
if gateway and os.execute("ping -q -c1 "..gateway) == 0 then
return true
end -- ping to gateway
end -- test for empty string
return false
local socket = require("socket")
return socket.dns.toip("www.google.com") ~= nil
end
function NetworkMgr:setHTTPProxy(proxy)

@ -28,6 +28,8 @@ function OTAManager:getOTAModel()
return "kindle"
elseif Device:isKobo() then
return "kobo"
elseif Device:isPocketBook() then
return "pocketbook"
else
return ""
end

Loading…
Cancel
Save