1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-- ToDo: Translate, Add descriptions and help texts
m = Map("network", "Schnittstellen")
s = m:section(TypedSection, "interface")
s.addremove = true
s:exclude("loopback")
s:depends("proto", "static")
s:depends("proto", "dhcp")
p = s:option(ListValue, "proto", "Protokoll")
p:value("static", "statisch")
p:value("dhcp", "DHCP")
s:option(Value, "ifname", "Schnittstelle")
s:option(Value, "ipaddr", "IP-Adresse")
s:option(Value, "netmask", "Netzmaske"):depends("proto", "static")
gw = s:option(Value, "gateway", "Gateway")
gw:depends("proto", "static")
gw.rmempty = true
dns = s:option(Value, "dns", "DNS-Server")
dns:depends("proto", "static")
dns.optional = true
mtu = s:option(Value, "mtu", "MTU")
mtu.optional = true
mtu.isinteger = true
return m
|