From: Marc Ferland Date: Tue, 25 Jun 2013 17:20:46 +0000 (+0000) Subject: lmsensors: fix fancontrol init script X-Git-Tag: rev_ivi_2015_02_04~3046 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48b74fcd6d739a9cef0e6b9236a2fa5e4aa8be66;p=scm%2Fbb%2Ftizen-distro.git 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. (From meta-openembedded rev: d3ef2ca6b8b9349fb24ebdce41e928901746b23f) Signed-off-by: Marc Ferland Signed-off-by: Martin Jansa Signed-off-by: Patrick Ohly --- diff --git a/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init b/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init index f179310..4433020 100644 --- a/meta-openembedded/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init +++ b/meta-openembedded/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)