12345678910111213141516171819202122232425262728293031323334 |
- #!/bin/sh /etc/rc.common
- USE_PROCD=1
- START=50
- DAEMON=/usr/sbin/gluon-radv-filterd
- validate_filterd_section() {
- uci_validate_section gluon-radv-filterd filterd "${1}" \
- 'iface:string' \
- 'chain:string:RADV_FILTER' \
- 'threshold:uinteger:20'
- }
- start_service() {
- config_load gluon-radv-filterd
- config_foreach start_filterd filterd
- }
- start_filterd() {
- local iface chain threshold
- validate_filterd_section "$1"
- procd_open_instance
- procd_set_param command $DAEMON -i "$iface" -c "$chain" -t $threshold
- procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
- procd_set_param netdev br-client
- procd_set_param stderr 1
- procd_close_instance
- }
- service_triggers() {
- procd_add_reload_trigger "gluon-radv-filterd"
- procd_add_validation "validate_filterd_section"
- }
|