proto: fix feature detection of installed protocol handlers

This commit is contained in:
Jo-Philipp Wich 2012-05-31 16:16:32 +00:00
parent eb7a72f251
commit 100b544f3b
3 changed files with 3 additions and 6 deletions

View file

@ -41,8 +41,7 @@ for _, p in ipairs({"6in4", "6to4"}) do
end
function proto.is_installed(self)
return nixio.fs.access("/lib/network/" .. p .. ".sh") or
nixio.fs.access("/lib/netifd/proto/" .. p .. ".sh")
return nixio.fs.access("/lib/netifd/proto/" .. p .. ".sh")
end
function proto.is_floating(self)

View file

@ -55,9 +55,7 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g"}) do
end
function proto.is_installed(self)
if nixio.fs.access("/lib/network/" .. p .. ".sh") then
return true
elseif p == "pppoa" then
if 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)

View file

@ -37,7 +37,7 @@ function proto.opkg_package(self)
end
function proto.is_installed(self)
return nixio.fs.access("/lib/network/relay.sh")
return nixio.fs.access("/etc/init.d/relayd")
end
function proto.is_floating(self)