mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-09 04:11:16 +00:00
lmsensors: fix fancontrol init script
Make the 'fancontrol stop' command work again by using the fancontrol pid file instead of matching the process by name. While at it, also do a bit of cleaning. Signed-off-by: Marc Ferland <ferlandm@sonatest.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
370e7d2b7d
commit
d3ef2ca6b8
@@ -1,4 +1,4 @@
|
|||||||
#! /bin/sh
|
#!/bin/sh
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: fancontrol
|
# Provides: fancontrol
|
||||||
# Required-Start: $local_fs
|
# Required-Start: $local_fs
|
||||||
@@ -16,8 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|||||||
DESC="fan control daemon"
|
DESC="fan control daemon"
|
||||||
NAME="fancontrol"
|
NAME="fancontrol"
|
||||||
FANCONTROL=`which $NAME`
|
FANCONTROL=`which $NAME`
|
||||||
|
PIDFILE="/var/run/fancontrol.pid"
|
||||||
. /etc/init.d/functions || exit 1
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
# Exit if the package is not installed
|
||||||
[ -x "$FANCONTROL" ] || exit 0
|
[ -x "$FANCONTROL" ] || exit 0
|
||||||
@@ -25,12 +24,12 @@ FANCONTROL=`which $NAME`
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DESC: $NAME... "
|
echo -n "Starting $DESC: $NAME... "
|
||||||
/sbin/start-stop-daemon -S -x $FANCONTROL -b -- $FANCONTROL_ARGS
|
start-stop-daemon -S -p $PIDFILE -b -x $FANCONTROL
|
||||||
echo "done."
|
echo "done."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping $DESC: $NAME... "
|
echo -n "Stopping $DESC: $NAME... "
|
||||||
/sbin/start-stop-daemon -K -x $FANCONTROL
|
start-stop-daemon -K -p $PIDFILE
|
||||||
echo "done."
|
echo "done."
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
|
|||||||
Reference in New Issue
Block a user