# See how we were called.
case "$1" in
start)
+ if [ ! -f /var/lock/subsys/sensors_modules ]; then
+ msg_starting "sensors daemon"; fail
+ nls "sensors_modules services not started" >&2
+ exit 6
+ fi
+
# Check if the service is already running?
if [ ! -f /var/lock/subsys/sensors ]; then
- if [ -z "$BUS" ] || [ -z "$CHIP" ]; then
- msg_starting "sensors daemon"; fail
- nls "BUS or CHIP not configured in /etc/sysconfig/sensors" >&2
- exit 6
- fi
-
- # insert modules
- for i in $BUS; do
- _modprobe single die "i2c-$i"
- done
- for i in $CHIP; do
- _modprobe single die "$i"
- done
-
- if [ "$SENSORS_SET" = "1" ]; then
- sensors -s
- fi
-
msg_starting "sensors daemon"
daemon sensord \
$([ -n "$INTERVAL" ] && echo "-i $INTERVAL") \
if [ -f /var/lock/subsys/sensors ]; then
msg_stopping "sensors daemon"
killproc sensord
-
- # remove kernel modules
- for i in $CHIP; do
- /sbin/rmmod $i >/dev/null 2>&1
- done
- for i in $BUS; do
- /sbin/rmmod i2c-$BUS >/dev/null 2>&1
- done
-
rm -f /var/lock/subsys/sensors
else
msg_not_running "sensors daemon"
# RRD db location
# RRD_LOGFILE=/var/log/sensors.rrd
-# configure sensors (i.e. call `sensors -s') before starting daemon?
-# Allows to change min and max alarm limits from sensors.conf
-#SENSORS_SET=1
-
-# BUS - stands for i2c bus, one of: ali1535, ali15x3, amd756, hydra, i801,
-# i810, isa, piix4, savage4, sis5595, via, viapro, voodoo3
-
-BUS=
-
-# CHIP - stands for sensors chip, one of: adm1021, adm1024, adm1025,
-# adm9240, bt869, ddcmon, ds1621, eeprom fscpos, fscscy, gl518sm,
-# gl520sm, icspll, it87, lm75, lm78, lm80 lm87, ltc1710, matorb,
-# maxilife, mtp008, pcf8574, sis5595, thmc50 via686a, vt1211, w83781d
-
-CHIP=
-
-# You may use sensors-detect commant to check what bus and chips are available
-
-# example for VIAKT* mainboards (bus is not (!) via)
-# BUS=isa
-# CHIP=via686a