X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=src%2Fffluci%2Fmodel%2Fcbi%2Fadmin_network%2Fdhcp.lua;fp=src%2Fffluci%2Fmodel%2Fcbi%2Fadmin_network%2Fdhcp.lua;h=83ba1964187e0e30b36c217504b534e435dbf1be;hb=b864e2933ddab6bb40868cd878c9b89f9073ad12;hp=0000000000000000000000000000000000000000;hpb=338f4598eb9c11efd62d77651673f4b179401868;p=project%2Fluci.git diff --git a/src/ffluci/model/cbi/admin_network/dhcp.lua b/src/ffluci/model/cbi/admin_network/dhcp.lua new file mode 100644 index 000000000..83ba19641 --- /dev/null +++ b/src/ffluci/model/cbi/admin_network/dhcp.lua @@ -0,0 +1,37 @@ +-- ToDo: Translate, Add descriptions and help texts +require("ffluci.model.uci") +require("ffluci.sys") + +m = Map("dhcp", "DHCP") + +s = m:section(TypedSection, "dhcp") +s.addremove = true +s.anonymous = true + +iface = s:option(ListValue, "interface", "Schnittstelle") +for k, v in pairs(ffluci.model.uci.show("network").network) do + if v[".type"] == "interface" and k ~= "loopback" then + iface:value(k) + end +end + +s:option(Value, "start", "Start").rmempty = true + +s:option(Value, "limit", "Limit").rmempty = true + +s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true + +s:option(Value, "name", "Name").optional = true + +s:option(Flag, "ignore", "Schnittstelle ignorieren").optional = true + +s:option(Value, "netmask", "Netzmaske").optional = true + +s:option(Flag, "force", "Start erzwingen").optional = true + +for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do + k, v = line:match("([^ ]+) +([^ ]+)") + s:option(Value, "dhcp"..k, v).optional = true +end + +return m \ No newline at end of file