1 #!/bin/sh /etc/rc.common
9 setup_switch
() { return 0; }
19 procd_set_param
command /sbin
/netifd
20 procd_set_param respawn
21 [ -e /proc
/sys
/kernel
/core_pattern
] && {
22 procd_set_param limits core
="unlimited"
23 echo '/tmp/%e.%p.%s.%t.core' > /proc
/sys
/kernel
/core_pattern
30 ubus call network reload
31 /sbin
/wifi reload_legacy
40 /sbin
/wifi reload_legacy
43 validate_atm_bridge_section
()
45 uci_validate_section network
"atm-bridge" "${1}" \
47 'vci:range(32, 65535):35' \
48 'vpi:range(0, 255):8' \
50 'encaps:or("llc", "vc"):llc' \
51 'payload:or("bridged", "routed"):bridged'
56 validate_route_section
()
58 uci_validate_section network route
"${1}" \
65 'table:or(range(0,65535),string)'
70 validate_route6_section
()
72 uci_validate_section network route6
"${1}" \
78 'table:or(range(0,65535),string)'
83 validate_rule_section
()
85 uci_validate_section network rule
"${1}" \
93 'lookup:or(range(0,65535),string)' \
94 'goto:range(0,65535)' \
95 'action:or("prohibit", "unreachable", "blackhole", "throw")'
100 validate_rule6_section
()
102 uci_validate_section network rule6
"${1}" \
110 'lookup:or(range(0,65535),string)' \
111 'goto:range(0,65535)' \
112 'action:or("prohibit", "unreachable", "blackhole", "throw")'
117 validate_switch_section
()
119 uci_validate_section network switch
"${1}" \
128 validate_switch_vlan
()
130 uci_validate_section network switch_vlan
"${1}" \
141 procd_add_config_trigger
"config.change" "network" /etc
/init.d
/network reload
142 procd_add_config_trigger
"config.change" "wireless" /etc
/init.d
/network reload
146 validate_atm_bridge_section
147 validate_route_section
148 validate_route6_section
149 validate_rule_section
150 validate_rule6_section
151 validate_switch_section