git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
47c601d
)
Fix behaviour of dynamicdhcp field (thanks to Fabio Mercuri)
author
Steven Barth
<redacted>
Tue, 18 Nov 2008 12:29:01 +0000
(12:29 +0000)
committer
Steven Barth
<redacted>
Tue, 18 Nov 2008 12:29:01 +0000
(12:29 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
index 17dcdb8f0071c4a07b26681957517210e27f7be7..872e6444d139e3a6d20036f9a76b6b604250a892 100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
@@
-45,7
+45,11
@@
s:option(Value, "limit", translate("limit")).rmempty = true
s:option(Value, "leasetime").rmempty = true
-s:option(Flag, "dynamicdhcp").rmempty = true
+local dd = s:option(Flag, "dynamicdhcp")
+dd.rmempty = false
+function dd.cfgvalue(self, section)
+ return Flag.cfgvalue(self, section) or "1"
+end
s:option(Value, "name", translate("name")).optional = true
@@
-65,4
+69,4
@@
for i, n in ipairs(s.children) do
end
end
-return m
\ No newline at end of file
+return m
git clone https://git.99rst.org/PROJECT