gluon-radv-filterd 879 B

12345678910111213141516171819202122232425262728293031323334
  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. 'iface:string' \
  8. 'chain:string:RADV_FILTER' \
  9. 'threshold:uinteger:20'
  10. }
  11. start_service() {
  12. config_load gluon-radv-filterd
  13. config_foreach start_filterd filterd
  14. }
  15. start_filterd() {
  16. local iface chain threshold
  17. validate_filterd_section "$1"
  18. procd_open_instance
  19. procd_set_param command $DAEMON -i "$iface" -c "$chain" -t $threshold
  20. procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
  21. procd_set_param netdev br-client
  22. procd_set_param stderr 1
  23. procd_close_instance
  24. }
  25. service_triggers() {
  26. procd_add_reload_trigger "gluon-radv-filterd"
  27. procd_add_validation "validate_filterd_section"
  28. }