diff options
| author | Marc Ferland <ferlandm@sonatest.com> | 2013-06-25 17:20:46 +0000 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-06-29 14:22:47 +0200 |
| commit | d3ef2ca6b8b9349fb24ebdce41e928901746b23f (patch) | |
| tree | e89d3c1cd8437f9eec562051ba0d4a66b8d2a04c /meta-oe/recipes-support/lm_sensors/lmsensors | |
| parent | 370e7d2b7dad956421a288c94c874501984f3bc4 (diff) | |
| download | meta-openembedded-d3ef2ca6b8b9349fb24ebdce41e928901746b23f.tar.gz | |
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>
Diffstat (limited to 'meta-oe/recipes-support/lm_sensors/lmsensors')
| -rw-r--r-- | meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init b/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init index f179310dd2..4433020b38 100644 --- a/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init +++ b/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #! /bin/sh | 1 | #!/bin/sh |
| 2 | ### BEGIN INIT INFO | 2 | ### BEGIN INIT INFO |
| 3 | # Provides: fancontrol | 3 | # Provides: fancontrol |
| 4 | # Required-Start: $local_fs | 4 | # Required-Start: $local_fs |
| @@ -16,8 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin | |||
| 16 | DESC="fan control daemon" | 16 | DESC="fan control daemon" |
| 17 | NAME="fancontrol" | 17 | NAME="fancontrol" |
| 18 | FANCONTROL=`which $NAME` | 18 | FANCONTROL=`which $NAME` |
| 19 | 19 | PIDFILE="/var/run/fancontrol.pid" | |
| 20 | . /etc/init.d/functions || exit 1 | ||
| 21 | 20 | ||
| 22 | # Exit if the package is not installed | 21 | # Exit if the package is not installed |
| 23 | [ -x "$FANCONTROL" ] || exit 0 | 22 | [ -x "$FANCONTROL" ] || exit 0 |
| @@ -25,12 +24,12 @@ FANCONTROL=`which $NAME` | |||
| 25 | case "$1" in | 24 | case "$1" in |
| 26 | start) | 25 | start) |
| 27 | echo -n "Starting $DESC: $NAME... " | 26 | echo -n "Starting $DESC: $NAME... " |
| 28 | /sbin/start-stop-daemon -S -x $FANCONTROL -b -- $FANCONTROL_ARGS | 27 | start-stop-daemon -S -p $PIDFILE -b -x $FANCONTROL |
| 29 | echo "done." | 28 | echo "done." |
| 30 | ;; | 29 | ;; |
| 31 | stop) | 30 | stop) |
| 32 | echo -n "Stopping $DESC: $NAME... " | 31 | echo -n "Stopping $DESC: $NAME... " |
| 33 | /sbin/start-stop-daemon -K -x $FANCONTROL | 32 | start-stop-daemon -K -p $PIDFILE |
| 34 | echo "done." | 33 | echo "done." |
| 35 | ;; | 34 | ;; |
| 36 | restart) | 35 | restart) |
