4a95f38f30
- add mkdir -p /run/irqbalance to sysv startup script needed to create socket /run/irqbalance/irqbalance<pid>.sock Fixes: - Bug 13541 [1] daemon.warn /usr/sbin/irqbalance: Daemon couldn't be bound to the file-based socket. [1] https://bugs.busybox.net/show_bug.cgi?id=13541 Reported-by: Alfredo Pons Menargues <alfredo.pons@gmail.com> Signed-off-by: Peter Seiderer <ps.report@gmx.net> [yann.morin.1998@free.fr: only create in start case] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
37 lines
588 B
Bash
37 lines
588 B
Bash
#!/bin/sh
|
|
#
|
|
# Starts irqbalance
|
|
#
|
|
|
|
EXEC="/usr/sbin/irqbalance"
|
|
ARGS=""
|
|
PID="/var/run/irqbalance.pid"
|
|
|
|
case "$1" in
|
|
start)
|
|
printf "Starting irqbalance: "
|
|
# for irqbalance socket /run/irqbalance/irqbalance<pid>.sock
|
|
mkdir -p /run/irqbalance
|
|
start-stop-daemon -S -q -x $EXEC -- $ARGS
|
|
if [ $? != 0 ]; then
|
|
echo "FAILED"
|
|
exit 1
|
|
else
|
|
echo "OK"
|
|
fi
|
|
pidof irqbalance > $PID
|
|
;;
|
|
stop)
|
|
printf "Stopping irqbalance: "
|
|
start-stop-daemon -K -q -p $PID
|
|
echo "OK"
|
|
;;
|
|
restart|reload)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|