1 -- ToDo: Translate, Add descriptions and help texts
2 require("luci.model.uci")
5 m = Map("dhcp", "DHCP", [[Mit Hilfe von DHCP können Netzteilnehmer automatisch
6 ihre Netzwerkkonfiguration (IP-Adresse, Netzmaske, DNS-Server, DHCP, ...) beziehen.]])
8 s = m:section(TypedSection, "dhcp")
12 iface = s:option(ListValue, "interface", "Schnittstelle")
13 luci.model.uci.foreach("network", "interface",
15 if section[".name"] ~= "loopback" then
16 iface:value(section[".name"])
17 s:depends("interface", section[".name"])
21 s:option(Value, "start", "Start", "Erste vergebene Adresse (letztes Oktett)").rmempty = true
23 s:option(Value, "limit", "Limit", "Anzahl zu vergebender Adressen -1").rmempty = true
25 s:option(Value, "leasetime", "Laufzeit").rmempty = true
27 s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
29 s:option(Value, "name", "Name").optional = true
31 s:option(Flag, "ignore", "Schnittstelle ignorieren", "DHCP für dieses Netzwerk deaktivieren").optional = true
33 s:option(Value, "netmask", "Netzmaske").optional = true
35 s:option(Flag, "force", "Start erzwingen").optional = true
37 for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
38 k, v = line:match("([^ ]+) +([^ ]+)")
39 s:option(Value, "dhcp"..k, v).optional = true