* [meta-oe][PATCH] lmsensors: fix fancontrol init script
@ 2013-06-25 15:35 Marc Ferland
2013-06-25 16:19 ` Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Marc Ferland @ 2013-06-25 15:35 UTC (permalink / raw)
To: openembedded-core
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>
---
meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | 9 ++++-----
1 file 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 f179310..4433020 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 @@
-#! /bin/sh
+#!/bin/sh
### BEGIN INIT INFO
# Provides: fancontrol
# Required-Start: $local_fs
@@ -16,8 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="fan control daemon"
NAME="fancontrol"
FANCONTROL=`which $NAME`
-
-. /etc/init.d/functions || exit 1
+PIDFILE="/var/run/fancontrol.pid"
# Exit if the package is not installed
[ -x "$FANCONTROL" ] || exit 0
@@ -25,12 +24,12 @@ FANCONTROL=`which $NAME`
case "$1" in
start)
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."
;;
stop)
echo -n "Stopping $DESC: $NAME... "
- /sbin/start-stop-daemon -K -x $FANCONTROL
+ start-stop-daemon -K -p $PIDFILE
echo "done."
;;
restart)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-oe][PATCH] lmsensors: fix fancontrol init script
2013-06-25 15:35 [meta-oe][PATCH] lmsensors: fix fancontrol init script Marc Ferland
@ 2013-06-25 16:19 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2013-06-25 16:19 UTC (permalink / raw)
To: Marc Ferland; +Cc: openembedded-core
On Tuesday 25 June 2013 11:35:39 Marc Ferland wrote:
> 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>
> ---
> meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | 9 ++++-----
> 1 file 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
> f179310..4433020 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 @@
> -#! /bin/sh
> +#!/bin/sh
> ### BEGIN INIT INFO
> # Provides: fancontrol
> # Required-Start: $local_fs
> @@ -16,8 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
> DESC="fan control daemon"
> NAME="fancontrol"
> FANCONTROL=`which $NAME`
> -
> -. /etc/init.d/functions || exit 1
> +PIDFILE="/var/run/fancontrol.pid"
>
> # Exit if the package is not installed
> [ -x "$FANCONTROL" ] || exit 0
> @@ -25,12 +24,12 @@ FANCONTROL=`which $NAME`
> case "$1" in
> start)
> 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."
> ;;
> stop)
> echo -n "Stopping $DESC: $NAME... "
> - /sbin/start-stop-daemon -K -x $FANCONTROL
> + start-stop-daemon -K -p $PIDFILE
> echo "done."
> ;;
> restart)
This is a patch against meta-oe, so it needs to go to openembedded-
devel@lists.openembedded.org.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-25 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 15:35 [meta-oe][PATCH] lmsensors: fix fancontrol init script Marc Ferland
2013-06-25 16:19 ` Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox