projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci-mod-admin-full: automatically set dns=1 for static leases with hostname
[project/luci.git]
/
modules
/
luci-mod-admin-full
/
luasrc
/
model
/
cbi
/
admin_network
/
dhcp.lua
diff --git
a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua
b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua
index
f418ecb
..
c7d330e
100644
(file)
--- a/
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua
+++ b/
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua
@@
-276,6
+276,16
@@
name = s:option(Value, "name", translate("Hostname"))
name.datatype = "hostname"
name.rmempty = true
name.datatype = "hostname"
name.rmempty = true
+function name.write(self, section, value)
+ Value.write(self, section, value)
+ m:set(section, "dns", "1")
+end
+
+function name.remove(self, section)
+ Value.remove(self, section)
+ m:del(section, "dns")
+end
+
mac = s:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
mac.datatype = "list(macaddr)"
mac.rmempty = true
mac = s:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
mac.datatype = "list(macaddr)"
mac.rmempty = true