]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Load sensor modules in collectd initskript
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 27 May 2008 15:55:52 +0000 (17:55 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 27 May 2008 15:55:52 +0000 (17:55 +0200)
Moved lm_sensors from /usr/local to /usr because collectd not find it

config/rootfiles/common/lm_sensors
lfs/lm_sensors
src/initscripts/init.d/collectd

index 7c7e44988cfd527aea0cb01ba1968f40fafad101..1c6ed657485959d4deb73809f089d65f0b35d853 100644 (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
index dee87ec4812853c417fb7b0a4cd4bc7f78eae1b8..cf73c79e640c83da29f545f5623f08eaee26876c 100644 (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)
index 1809b8bde364a62fd63eb469c411caccc6d954af..7083ffaa711885376e47aa2755aa1a899094e443 100644 (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