Changeset 8657

Show
Ignore:
Timestamp:
04/27/12 19:10:51 (13 months ago)
Author:
jow
Message:

protocols/ppp: fix install state detection with netifd

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/protocols/ppp/luasrc/model/network/proto_ppp.lua

    r7690 r8657  
    5656 
    5757    function proto.is_installed(self) 
    58         return nixio.fs.access("/lib/network/" .. p .. ".sh") 
     58        if nixio.fs.access("/lib/network/" .. p .. ".sh") then 
     59            return true 
     60        elseif p == "pppoa" then 
     61            return (nixio.fs.glob("/usr/lib/pppd/*/pppoatm.so")() ~= nil) 
     62        elseif p == "pppoe" then 
     63            return (nixio.fs.glob("/usr/lib/pppd/*/rp-pppoe.so")() ~= nil) 
     64        elseif p == "3g" then 
     65            return nixio.fs.access("/lib/netifd/proto/3g.sh") 
     66        else 
     67            return nixio.fs.access("/lib/netifd/proto/ppp.sh") 
     68        end 
    5969    end 
    6070