Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move fixes from 0.1 branch up to master. #15

Merged
merged 5 commits into from
Aug 27, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion luasrc/model/cbi/commotion/meshconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,10 @@ else
end
end

return m
m2 = Map("commotiond")
node = m2:section(TypedSection, "node", translate("Settings specific to this node"))
node.anonymous = true
node.optional = true
node:option(Value, "dhcp_timeout", "DHCP Timeout", "How many seconds to wait on boot for a DHCP lease from the gateway")

return m, m2
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)