3 # chkconfig: 2345 26 74
4 # description: sensors is used for monitoring motherboard sensor values.
5 # config: /etc/sysconfig/lm_sensors
8 # Source function library.
9 . /etc/rc.d/init.d/functions
12 if [ -f /etc/sysconfig/lm_sensors ]; then
13 . /etc/sysconfig/lm_sensors
17 if [ -z "$HWMON_MODULES" ]; then
18 nls "lm_sensors: not configured, run sensors-detect"
22 # Check if the service is already running?
23 if [ -f /var/lock/subsys/lm_sensors ]; then
24 msg_already_running "lm_sensors"
27 for module in $BUS_MODULES $HWMON_MODULES ; do
28 _modprobe single $module
31 touch /var/lock/subsys/lm_sensors
35 if [ -z "$HWMON_MODULES" ]; then
36 nls "lm_sensors: not configured, run sensors-detect"
40 if [ ! -f /var/lock/subsys/lm_sensors ]; then
44 msg_stopping "lm_sensors"
45 for module in $HWMON_MODULES $BUS_MODULES ; do
46 /sbin/modprobe -r $module >/dev/null 2>&1
49 rm -f /var/lock/subsys/lm_sensors
53 # See how we were called.
69 if [ -f /var/lock/subsys/lm_sensors ]; then
75 msg_usage "$0 {start|stop|status|restart|reload|condrestart}"