4 # irqbalance: Sets up fbcon video modes.
7 # chkconfig: 2345 01 99
8 # description: irqbalance
10 # config: /etc/sysconfig/irqbalance
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 if [ -f /etc/sysconfig/irqbalance ]; then
17 . /etc/sysconfig/irqbalance
21 if [ "$(LC_ALL=C grep "^processor.*:.*[0-9]" /proc/cpuinfo | wc -l)" -lt 2 ]; then
25 is_yes "$IRQBALANCE_ONE_SHOT" && IRQBALANCE_OPT="${IRQBALANCE_OPT} --oneshot"
27 # See how we were called.
30 # Check if service is already running?
31 if [ ! -f /var/lock/subsys/irqbalance ]; then
32 msg_starting irqbalance
33 daemon irqbalance ${IRQBALANCE_OPT}
35 [ $RETVAL -eq 0 ] && ! is_yes "$IRQBALANCE_ONE_SHOT" && touch /var/lock/subsys/irqbalance
37 msg_already_running irqbalance
41 if ! is_yes "$IRQBALANCE_ONE_SHOT"; then
42 if [ -f /var/lock/subsys/irqbalance ]; then
43 msg_stopping irqbalance
45 rm -f /var/lock/subsys/irqbalance
47 msg_not_running irqbalance
60 msg_usage "$0 {start|stop|restart|force-reload|status}"