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"
32 ubus call network reload || rv
=1
33 /sbin
/wifi reload_legacy
44 ubus
-t 30 wait_for network.interface
45 /sbin
/wifi reload_legacy
48 validate_atm_bridge_section
()
50 uci_validate_section network
"atm-bridge" "${1}" \
52 'vci:range(32, 65535):35' \
53 'vpi:range(0, 255):8' \
55 'encaps:or("llc", "vc"):llc' \
56 'payload:or("bridged", "routed"):bridged'
59 validate_route_section
()
61 uci_validate_section network route
"${1}" \
68 'table:or(range(0,65535),string)'
71 validate_route6_section
()
73 uci_validate_section network route6
"${1}" \
79 'table:or(range(0,65535),string)'
82 validate_rule_section
()
84 uci_validate_section network rule
"${1}" \
92 'lookup:or(range(0,65535),string)' \
93 'goto:range(0,65535)' \
94 'action:or("prohibit", "unreachable", "blackhole", "throw")'
97 validate_rule6_section
()
99 uci_validate_section network rule6
"${1}" \
107 'lookup:or(range(0,65535),string)' \
108 'goto:range(0,65535)' \
109 'action:or("prohibit", "unreachable", "blackhole", "throw")'
112 validate_switch_section
()
114 uci_validate_section network switch
"${1}" \
121 validate_switch_vlan
()
123 uci_validate_section network switch_vlan
"${1}" \
131 procd_add_reload_trigger network wireless
134 validate_atm_bridge_section
135 validate_route_section
136 validate_route6_section
137 validate_rule_section
138 validate_rule6_section
139 validate_switch_section