Add support for uci config file. Only a global 'enabled" switch has been implemented so far. * Default config disables irqbalance initially, so that there is no change with the previous behaviour (and the possibly existing separate launch scripts in people's builds). Config file and init script can be later extended for irqbalance options like the oneshot mode or the evaluation interval (Also change the init file to use tabs) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
17 lines
321 B
Bash
17 lines
321 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
START=11
|
|
USE_PROCD=1
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load 'irqbalance'
|
|
config_get_bool enabled irqbalance enabled 0
|
|
[ "$enabled" -gt 0 ] || return 0
|
|
|
|
procd_open_instance "irqbalance"
|
|
procd_set_param command /usr/sbin/irqbalance -f
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|
|
|