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"
24 echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
31 ubus call network reload
32 /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'
57 validate_route_section()
59 uci_validate_section network route "${1}" \
66 'table:or(range(0,65535),string)'
71 validate_route6_section()
73 uci_validate_section network route6 "${1}" \
79 'table:or(range(0,65535),string)'
84 validate_rule_section()
86 uci_validate_section network rule "${1}" \
94 'lookup:or(range(0,65535),string)' \
95 'goto:range(0,65535)' \
96 'action:or("prohibit", "unreachable", "blackhole", "throw")'
101 validate_rule6_section()
103 uci_validate_section network rule6 "${1}" \
111 'lookup:or(range(0,65535),string)' \
112 'goto:range(0,65535)' \
113 'action:or("prohibit", "unreachable", "blackhole", "throw")'
118 validate_switch_section()
120 uci_validate_section network switch "${1}" \
129 validate_switch_vlan()
131 uci_validate_section network switch_vlan "${1}" \
142 procd_add_config_trigger "config.change" "network" /etc/init.d/network reload
143 procd_add_config_trigger "config.change" "wireless" /etc/init.d/network reload
147 validate_atm_bridge_section
148 validate_route_section
149 validate_route6_section
150 validate_rule_section
151 validate_rule6_section
152 validate_switch_section