aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lm_sensors/files/fancontrol.sh
diff options
context:
space:
mode:
authorMarc Ferland <ferlandm@sonatest.com>2012-10-19 15:15:34 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-10-24 08:27:15 +0200
commitc00f3c285c722a480ce9f02bcebc64fd36c1a1b0 (patch)
tree60e448e4de3efcd1c1fa5675101a453effa29f5e /meta-oe/recipes-support/lm_sensors/files/fancontrol.sh
parent4a0066557bcf3af2a9516b523efbfba7387db063 (diff)
downloadmeta-openembedded-c00f3c285c722a480ce9f02bcebc64fd36c1a1b0.tar.gz
lmsensors: Initial commit
The lmsensors project provides hardware health monitoring tools in the form of kernel drivers, a user-space library and some helper programs. This recipe provides all the different user-space tools offered by lmsensors in separete packages. Startup scripts and default configuration files are also made available through this commit. The packages consist of (description text from lmsensors documentation): * lmsensors-libsensors: The user-space sensors support library code. * lmsensors-sensors: A console tool to report sensor readings and set new sensor limits. * lmsensors-sensord: A daemon to watch sensor values and log problems. It includes RRD support. * lmsensors-fancontrol: Controls fanspeeds responding to changes on temperature sensors. Configuration through pwmconfig. * lmsensors-sensorsdetect: This program tries to detect the available SMBus adapters and the chips connected to them, as well as Super-I/O and misc chips. * lmsensors-sensorsconfconvert: Convert configuration files from lmsensorsv2 to lmsensorsv3. * lmsensors-pwmconfig: tests the pwm (pulse width modulation) outputs of sensors for their effect on the fans and helps to setup the configfile for fancontrol. * lmsensors-isatools: This program sets/gets the registers of ISA or Super-I/O chips. Signed-off-by: Marc Ferland <ferlandm@sonatest.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support/lm_sensors/files/fancontrol.sh')
-rw-r--r--meta-oe/recipes-support/lm_sensors/files/fancontrol.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/files/fancontrol.sh b/meta-oe/recipes-support/lm_sensors/files/fancontrol.sh
new file mode 100644
index 0000000000..f179310dd2
--- /dev/null
+++ b/meta-oe/recipes-support/lm_sensors/files/fancontrol.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: fancontrol
+# Required-Start: $local_fs
+# Should-Start:
+# Required-Stop: $local_fs
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: fancontrol initscript
+# Description: Starts and controls the fancontrol daemon
+### END INIT INFO
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+DESC="fan control daemon"
+NAME="fancontrol"
+FANCONTROL=`which $NAME`
+
+. /etc/init.d/functions || exit 1
+
+# Exit if the package is not installed
+[ -x "$FANCONTROL" ] || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME... "
+ /sbin/start-stop-daemon -S -x $FANCONTROL -b -- $FANCONTROL_ARGS
+ echo "done."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME... "
+ /sbin/start-stop-daemon -K -x $FANCONTROL
+ echo "done."
+ ;;
+ restart)
+ echo "Restarting $DESC: $NAME... "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0