Load sensor modules in collectd initskript

Moved lm_sensors from /usr/local to /usr because collectd not find it
This commit is contained in:
Arne Fitzenreiter
2008-05-27 17:55:52 +02:00
parent da20529163
commit a3f2742fc7
3 changed files with 48 additions and 28 deletions

View File

@@ -1,24 +1,24 @@
etc/sensors3.conf
usr/local/bin/sensors
usr/local/bin/sensors-conf-convert
#usr/local/include/sensors
#usr/local/include/sensors/error.h
#+usr/local/include/sensors/sensors.h
usr/local/lib/libsensors.a
usr/local/lib/libsensors.so
usr/local/lib/libsensors.so.4
usr/local/lib/libsensors.so.4.0.2
#usr/local/man/man1/sensors.1
#usr/local/man/man3
#usr/local/man/man3/libsensors.3
#usr/local/man/man5/sensors.conf.5
#usr/local/man/man8/fancontrol.8
#usr/local/man/man8/isadump.8
#usr/local/man/man8/isaset.8
#usr/local/man/man8/pwmconfig.8
usr/bin/sensors
usr/bin/sensors-conf-convert
#usr/include/sensors
#usr/include/sensors/error.h
#usr/include/sensors/sensors.h
#usr/lib/libsensors.a
usr/lib/libsensors.so
usr/lib/libsensors.so.4
usr/lib/libsensors.so.4.0.2
#usr/man/man1/sensors.1
#usr/man/man3
#usr/man/man3/libsensors.3
#usr/man/man5/sensors.conf.5
#usr/man/man8/fancontrol.8
#usr/man/man8/isadump.8
#usr/man/man8/isaset.8
#usr/man/man8/pwmconfig.8
#usr/local/man/man8/sensors-detect.8
usr/local/sbin/fancontrol
usr/local/sbin/isadump
usr/local/sbin/isaset
usr/local/sbin/pwmconfig
usr/local/sbin/sensors-detect
usr/sbin/fancontrol
usr/sbin/isadump
usr/sbin/isaset
usr/sbin/pwmconfig
usr/sbin/sensors-detect

View File

@@ -73,7 +73,7 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
cd $(DIR_APP) && make PREFIX=/usr $(MAKETUNING)
cd $(DIR_APP) && make PREFIX=/usr install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -7,6 +7,27 @@
case "$1" in
start)
if [ ! -e /etc/sysconfig/lm_sensors ]; then
boot_mesg "Searching for Sensors..."
"yes" | /usr/sbin/sensors-detect > /dev/null
evaluate_retval
if [ ! -e /etc/sysconfig/lm_sensors ]; then
echo "#No Sensors detected " > /etc/sysconfig/lm_sensors
fi
fi
boot_mesg -n "Loading Sensor Modules..."
for modul in `cat /etc/sysconfig/lm_sensors | grep "MODULE_" | cut -d"=" -f2`; do
modprobe $modul > /dev/null 2>&1;
if [ ${?} = 0 ]; then
boot_mesg -n "$SUCCESS$modul$NORMAL ";
else
boot_mesg -n "$FAILURE$modul$NORMAL ";
fi
done
boot_mesg;
echo_ok;
boot_mesg "Starting Collection daemon..."
/usr/sbin/collectd -C /etc/collectd.conf
evaluate_retval
@@ -23,15 +44,14 @@ case "$1" in
# boot_mesg "Bringing up mbmon daemon..."
# /usr/bin/mbmon -P 411 -r
# evaluate_retval
;;
stop)
# if mbmon is not running on your system, we advise to comment out these lines
# in order to prevent fail
boot_mesg "Stopping mbmon daemon..."
killproc /usr/bin/mbmon
evaluate_retval
# boot_mesg "Stopping mbmon daemon..."
# killproc /usr/bin/mbmon
# evaluate_retval
# boot_mesg "Stopping hddtemp daemon..."
# killproc /usr/sbin/hddtemp
# evaluate_retval