4 # irqbalance: Balancing of IRQs between multiple CPUs
7 # chkconfig: 2345 01 99
8 # description: irqbalance
10 # config: /etc/sysconfig/irqbalance
13 if [ "$(LC_ALL=C grep "^processor.*:.*[0-9]" /proc/cpuinfo | wc -l)" -lt 2 ]; then
17 # Source function library
18 . /etc/rc.d/init.d/functions
21 if [ -f /etc/sysconfig/irqbalance ]; then
22 . /etc/sysconfig/irqbalance
25 is_yes "$IRQBALANCE_ONE_SHOT" && IRQBALANCE_OPT="${IRQBALANCE_OPT} oneshot"
28 # Check if service is already running?
29 if [ ! -f /var/lock/subsys/irqbalance ]; then
30 msg_starting irqbalance
31 daemon irqbalance ${IRQBALANCE_OPT}
33 [ $RETVAL -eq 0 ] && ! is_yes "$IRQBALANCE_ONE_SHOT" && touch /var/lock/subsys/irqbalance
35 msg_already_running irqbalance
40 if ! is_yes "$IRQBALANCE_ONE_SHOT"; then
41 if [ -f /var/lock/subsys/irqbalance ]; then
42 msg_stopping irqbalance
44 rm -f /var/lock/subsys/irqbalance
46 msg_not_running irqbalance
52 # See how we were called.
69 msg_usage "$0 {start|stop|restart|force-reload|status}"