1 -- ToDo: Translate, Add descriptions and help texts
2 require("ffluci.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(ffluci.model.uci.show("network").network) do
14 if v[".type"] == "interface" and k ~= "loopback" then
19 s:option(Value, "start", "Start", "Erste vergebene Adresse (letztes Oktett)").rmempty = true
21 s:option(Value, "limit", "Limit", "Letzte vergebene Adresse (letztes Oktett)").rmempty = true
23 s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
25 s:option(Value, "name", "Name").optional = true
27 s:option(Flag, "ignore", "Schnittstelle ignorieren", "DHCP für dieses Netzwerk deaktivieren").optional = true
29 s:option(Value, "netmask", "Netzmaske").optional = true
31 s:option(Flag, "force", "Start erzwingen").optional = true
33 for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do
34 k, v = line:match("([^ ]+) +([^ ]+)")
35 s:option(Value, "dhcp"..k, v).optional = true