* luci/modules/admin-core: extend network uvl scheme to cover ppp configurations too

This commit is contained in:
Jo-Philipp Wich 2008-10-12 21:40:22 +00:00
parent 6d3d30d88f
commit 5e0eca99a3

View file

@ -10,11 +10,12 @@ config section
list depends 'proto=static, ipaddr, netmask' list depends 'proto=static, ipaddr, netmask'
list depends 'proto=static, ip6addr' list depends 'proto=static, ip6addr'
list depends 'proto=pppoe, username, password' list depends 'proto=pppoe, username, password'
list depends 'proto=ppp, device'
list depends 'proto=pptp, username, password, server' list depends 'proto=pptp, username, password, server'
list depends 'proto=dhcp' list depends 'proto=dhcp'
list depends 'proto=none' list depends 'proto=none'
option named true option named 'true'
option required true option required 'true'
config variable config variable
option name 'ifname' option name 'ifname'
@ -74,7 +75,7 @@ config variable
option title 'DNS server (IPv4 or IPv6)' option title 'DNS server (IPv4 or IPv6)'
option section 'network.interface' option section 'network.interface'
option datatype 'ipaddr' option datatype 'ipaddr'
option multival true option multival 'true'
config variable config variable
option name 'keepalive' option name 'keepalive'
@ -82,8 +83,9 @@ config variable
option descriptions 'Number of connection failures before reconnect' option descriptions 'Number of connection failures before reconnect'
option section 'network.interface' option section 'network.interface'
option datatype 'uint' option datatype 'uint'
list depends proto=pppoe list depends 'proto=pppoe'
list depends proto=pptp list depends 'proto=pptp'
list depends 'proto=ppp'
config variable config variable
option name 'demand' option name 'demand'
@ -91,38 +93,90 @@ config variable
option description 'Number of seconds to wait before closing the connection due to inactivity' option description 'Number of seconds to wait before closing the connection due to inactivity'
option section 'network.interface' option section 'network.interface'
option datatype 'uint' option datatype 'uint'
list depends proto=pppoe list depends 'proto=pppoe'
list depends proto=pptp list depends 'proto=pptp'
list depends 'proto=ppp'
config variable config variable
option name 'username' option name 'username'
option title 'Username' option title 'Username'
option section 'network.interface' option section 'network.interface'
option datatype 'string' option datatype 'string'
list depends proto=pppoe list depends 'proto=pppoe'
list depends proto=pptp list depends 'proto=pptp'
list depends 'proto=ppp'
config variable config variable
option name 'password' option name 'password'
option title 'Password' option title 'Password'
option section 'network.interface' option section 'network.interface'
option datatype 'string' option datatype 'string'
list depends proto=pppoe list depends 'proto=pppoe'
list depends proto=pptp list depends 'proto=pptp'
list depends 'proto=ppp'
config variable config variable
option name 'server' option name 'server'
option title 'PPTP server' option title 'PPTP server'
option section 'network.interface' option section 'network.interface'
option datatype 'ipaddr' option datatype 'ipaddr'
list depends proto=pptp list depends 'proto=pptp'
config variable
option name 'device'
option title 'Modem device'
option section 'network.interface'
option datatype 'file'
list depends 'proto=ppp'
config variable
option name 'defaultroute'
option title 'Replace default route'
option section 'network.interface'
option datatype 'boolean'
list depends 'proto=ppp'
config variable
option name 'peerdns'
option title 'Use peer DNS'
option section 'network.interface'
option datatype 'boolean'
list depends 'proto=ppp'
config variable
option name 'ipv6'
option title 'Enable IPv6 on PPP link'
option section 'network.interface'
option datatype 'boolean'
list depends 'proto=ppp'
config variable
option name 'connect'
option title 'PPP connect script'
option section 'network.interface'
option datatype 'file'
list depends 'proto=ppp'
config variable
option name 'disconnect'
option title 'PPP disconnect script'
option section 'network.interface'
option datatype 'file'
list depends 'proto=ppp'
config variable
option name 'pppd_options'
option title 'Additional PPP daemon options'
option section 'network.interface'
option datatype 'string'
list depends 'proto=ppp'
config variable config variable
option name 'proto' option name 'proto'
option title 'Protocol' option title 'Protocol'
option section 'network.interface' option section 'network.interface'
option type 'enum' option type 'enum'
option required true option required 'true'
config enum config enum
option variable 'network.interface.proto' option variable 'network.interface.proto'
@ -133,7 +187,7 @@ config enum
option variable 'network.interface.proto' option variable 'network.interface.proto'
option value 'dhcp' option value 'dhcp'
option title 'Retrieve IP address via DHCP' option title 'Retrieve IP address via DHCP'
option default true option default 'true'
config enum config enum
option variable 'network.interface.proto' option variable 'network.interface.proto'
@ -148,7 +202,12 @@ config enum
config enum config enum
option variable 'network.interface.proto' option variable 'network.interface.proto'
option value 'pppoe' option value 'pppoe'
option title 'Retrieve IP address via PPPoE' option title 'Interface is a PPPoE connection'
config enum
option variable 'network.interface.proto'
option value 'ppp'
option title 'Interface is a PPP connection'
config variable config variable
option name 'type' option name 'type'
@ -169,14 +228,14 @@ config section
option package 'network' option package 'network'
list depends 'proto=static, ipaddr, netmask' list depends 'proto=static, ipaddr, netmask'
list depends 'proto=static, ip6addr' list depends 'proto=static, ip6addr'
option named true option named 'true'
config variable config variable
option name 'interface' option name 'interface'
option title 'Parent interface' option title 'Parent interface'
option section 'network.alias' option section 'network.alias'
option valueof 'network.interface' option valueof 'network.interface'
option required true option required 'true'
config variable config variable
option name 'ipaddr' option name 'ipaddr'
@ -225,7 +284,7 @@ config variable
option title 'Protocol' option title 'Protocol'
option section 'network.alias' option section 'network.alias'
option type 'enum' option type 'enum'
option required true option required 'true'
config enum config enum
option variable 'network.alias.proto' option variable 'network.alias.proto'
@ -244,14 +303,14 @@ config variable
option title 'Interface' option title 'Interface'
option section 'network.route' option section 'network.route'
option valueof 'network.interface' option valueof 'network.interface'
option required true option required 'true'
config variable config variable
option name 'target' option name 'target'
option title 'Target IPv4 host or network' option title 'Target IPv4 host or network'
option section 'network.route' option section 'network.route'
option datatype 'ip4addr' option datatype 'ip4addr'
option required true option required 'true'
config variable config variable
option name 'netmask' option name 'netmask'
@ -264,7 +323,7 @@ config variable
option title 'IPv4 gateway' option title 'IPv4 gateway'
option section 'network.route' option section 'network.route'
option datatype 'ip4addr' option datatype 'ip4addr'
option required true option required 'true'
@ -272,6 +331,6 @@ config section
option name 'switch' option name 'switch'
option title 'Section switch' option title 'Section switch'
option package 'network' option package 'network'
option named true option named 'true'
option dynamic true option dynamic 'true'
option required true option required 'true'