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 for k, v in pairs(luci.model.uci.sections("network")) do
14 if v[".type"] == "interface" and k ~= "loopback" then
16 s:depends("interface", k) -- Only change sections with existing interfaces
20 s:option(Value, "start", "Start", "Erste vergebene Adresse (letztes Oktett)").rmempty = true
22 s:option(Value, "limit", "Limit", "Anzahl zu vergebender Adressen -1").rmempty = true
24 s:option(Value, "leasetime", "Laufzeit").rmempty = true
26 s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
28 s:option(Value, "name", "Name").optional = true
30 s:option(Flag, "ignore", "Schnittstelle ignorieren", "DHCP für dieses Netzwerk deaktivieren").optional = true
32 s:option(Value, "netmask", "Netzmaske").optional = true
34 s:option(Flag, "force", "Start erzwingen").optional = true
36 for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
37 k, v = line:match("([^ ]+) +([^ ]+)")
38 s:option(Value, "dhcp"..k, v).optional = true