gluon-radv-filterd 813 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh /etc/rc.common
  2. USE_PROCD=1
  3. START=50
  4. DAEMON=/usr/sbin/gluon-radv-filterd
  5. validate_filterd_section() {
  6. uci_validate_section gluon-radv-filterd filterd "${1}" \
  7. 'threshold:uinteger:20'
  8. }
  9. start_service() {
  10. config_load gluon-radv-filterd
  11. config_foreach start_filterd filterd
  12. }
  13. start_filterd() {
  14. local iface chain threshold
  15. validate_filterd_section "$1"
  16. procd_open_instance
  17. procd_set_param command $DAEMON -i br-client -c RADV_FILTER -t $threshold
  18. procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
  19. procd_set_param netdev br-client
  20. procd_set_param stderr 1
  21. procd_close_instance
  22. }
  23. service_triggers() {
  24. procd_add_reload_trigger "gluon-radv-filterd"
  25. procd_add_validation "validate_filterd_section"
  26. }