You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
637 B

  1. #!/bin/sh /etc/rc.common
  2. START=90
  3. STOP=10
  4. USE_PROCD=1
  5. service_triggers()
  6. {
  7. procd_add_reload_trigger "irqbalance"
  8. }
  9. start_service() {
  10. local enabled
  11. config_load 'irqbalance'
  12. config_get_bool enabled irqbalance enabled 0
  13. [ "$enabled" -gt 0 ] || return 0
  14. # 10 is the default
  15. config_get interval irqbalance interval 10
  16. # A list of IRQ's to ignore
  17. banirq=""
  18. handle_banirq_value()
  19. {
  20. banirq="$banirq -i $1"
  21. }
  22. config_list_foreach irqbalance banirq handle_banirq_value
  23. procd_open_instance "irqbalance"
  24. procd_set_param command /usr/sbin/irqbalance -f -t "$interval" "$banirq"
  25. procd_set_param respawn
  26. procd_close_instance
  27. }