1 #!/bin/sh /etc/rc.common
9 setup_switch
() { return 0; }
19 procd_set_param
command /sbin
/netifd
20 procd_set_param respawn
21 procd_set_param watch network.interface
22 [ -e /proc
/sys
/kernel
/core_pattern
] && {
23 procd_set_param limits core
="unlimited"
30 ubus call network reload
31 /sbin
/wifi reload_legacy
40 ubus
-t 30 wait_for network.interface
41 /sbin
/wifi reload_legacy
44 validate_atm_bridge_section
()
46 uci_validate_section network
"atm-bridge" "${1}" \
48 'vci:range(32, 65535):35' \
49 'vpi:range(0, 255):8' \
51 'encaps:or("llc", "vc"):llc' \
52 'payload:or("bridged", "routed"):bridged'
55 validate_route_section
()
57 uci_validate_section network route
"${1}" \
64 'table:or(range(0,65535),string)'
67 validate_route6_section
()
69 uci_validate_section network route6
"${1}" \
75 'table:or(range(0,65535),string)'
78 validate_rule_section
()
80 uci_validate_section network rule
"${1}" \
88 'lookup:or(range(0,65535),string)' \
89 'goto:range(0,65535)' \
90 'action:or("prohibit", "unreachable", "blackhole", "throw")'
93 validate_rule6_section
()
95 uci_validate_section network rule6
"${1}" \
103 'lookup:or(range(0,65535),string)' \
104 'goto:range(0,65535)' \
105 'action:or("prohibit", "unreachable", "blackhole", "throw")'
108 validate_switch_section
()
110 uci_validate_section network switch
"${1}" \
117 validate_switch_vlan
()
119 uci_validate_section network switch_vlan
"${1}" \
127 procd_add_reload_trigger network wireless
130 validate_atm_bridge_section
131 validate_route_section
132 validate_route6_section
133 validate_rule_section
134 validate_rule6_section
135 validate_switch_section