summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-04-27 18:10:51 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-04-27 18:10:51 +0000
commit62ec28f0be1b951342e5770c80c4bc0bb7182622 (patch)
tree8be847b50c628419422040d00511039ab1a32758
parentcf8b8f874981a06d4dd41494ea3fb98157b60a3b (diff)
protocols/ppp: fix install state detection with netifd
-rw-r--r--protocols/ppp/luasrc/model/network/proto_ppp.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/ppp/luasrc/model/network/proto_ppp.lua b/protocols/ppp/luasrc/model/network/proto_ppp.lua
index af6f394025..2988385b22 100644
--- a/protocols/ppp/luasrc/model/network/proto_ppp.lua
+++ b/protocols/ppp/luasrc/model/network/proto_ppp.lua
@@ -55,7 +55,17 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g"}) do
end
function proto.is_installed(self)
- return nixio.fs.access("/lib/network/" .. p .. ".sh")
+ if nixio.fs.access("/lib/network/" .. p .. ".sh") then
+ return true
+ elseif p == "pppoa" then
+ return (nixio.fs.glob("/usr/lib/pppd/*/pppoatm.so")() ~= nil)
+ elseif p == "pppoe" then
+ return (nixio.fs.glob("/usr/lib/pppd/*/rp-pppoe.so")() ~= nil)
+ elseif p == "3g" then
+ return nixio.fs.access("/lib/netifd/proto/3g.sh")
+ else
+ return nixio.fs.access("/lib/netifd/proto/ppp.sh")
+ end
end
function proto.is_floating(self)