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 b9fbf64ec8bafe051ce91d1340f3162f8523c7f2..63735f6f8e9ef923020779ce6683c4c2bc8ca64a 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 2988385b225bdd6cb41a00e081243bb26f82146e..b00c9f0a21a069d5b26416abeede3031232da9ee 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 03f6d6abf079b3ed0c75c3f5b1150eaede97be3b..42bd1f846acd69150ffba0696452808e49f16fa9 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)