proto: fix feature detection of installed protocol handlers
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 31 May 2012 16:16:32 +0000 (16:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 31 May 2012 16:16:32 +0000 (16:16 +0000)
protocols/6x4/luasrc/model/network/proto_6x4.lua
protocols/ppp/luasrc/model/network/proto_ppp.lua
protocols/relay/luasrc/model/network/proto_relay.lua

index b9fbf64..63735f6 100644 (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)
index 2988385..b00c9f0 100644 (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)
index 03f6d6a..42bd1f8 100644 (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)