1 -- ToDo: Translate, Add descriptions and help texts
2 require("ffluci.model.uci")
5 m = Map("dhcp", "DHCP")
7 s = m:section(TypedSection, "dhcp")
11 iface = s:option(ListValue, "interface", "Schnittstelle")
12 for k, v in pairs(ffluci.model.uci.show("network").network) do
13 if v[".type"] == "interface" and k ~= "loopback" then
18 s:option(Value, "start", "Start").rmempty = true
20 s:option(Value, "limit", "Limit").rmempty = true
22 s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
24 s:option(Value, "name", "Name").optional = true
26 s:option(Flag, "ignore", "Schnittstelle ignorieren").optional = true
28 s:option(Value, "netmask", "Netzmaske").optional = true
30 s:option(Flag, "force", "Start erzwingen").optional = true
32 for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do
33 k, v = line:match("([^ ]+) +([^ ]+)")
34 s:option(Value, "dhcp"..k, v).optional = true