Skip to content

Commit

Permalink
Merge pull request #15 from opentechinstitute/0.1
Browse files Browse the repository at this point in the history
Move fixes from 0.1 branch up to master. Tested.
  • Loading branch information
jheretic committed Aug 27, 2013
2 parents 9acaeb0 + 17cd497 commit 1d9ac67
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions luasrc/model/network/proto_commotion.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--[[
LuCI - Network model - 3G, PPP, PPtP, PPPoE and PPPoA protocol extension
LuCI - Network model - Commotion protocol extension
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Copyright 2013 Josh King <jking@chambana.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -28,41 +28,3 @@ function proto.get_i18n(self)
return luci.i18n.translate("Commotion Interface")
end
end

function proto.ifname(self)
return p .. "-" .. self.sid
end

-- The Following function is disabled until we have a package the interface relies on
--function proto.opkg_package(self)
-- if p == "commotion" then
-- return commotionbase
-- end
--end

-- The following function is disabled because it refers to depreciated shell script
--function proto.is_installed(self)
-- return nixio.fs.access("/lib/network/commotion.sh")
--end

function proto.is_virtual(self)
return true
end

function proto.get_interfaces(self)
if self:is_floating() then
return nil
else
return netmod.protocol.get_interfaces(self)
end
end

function proto.contains_interface(self, ifc)
if self:is_floating() then
return (netmod:ifnameof(ifc) == self:ifname())
else
return netmod.protocol.contains_interface(self, ifc)
end
end

netmod:register_pattern_virtual("^%s-%%w" % p)

0 comments on commit 1d9ac67

Please sign in to comment.