]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix collectd thermal-zone disabling
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 12 May 2009 17:29:23 +0000 (19:29 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 12 May 2009 17:29:23 +0000 (19:29 +0200)
config/collectd/collectd.conf
config/collectd/collectd.thermal [new file with mode: 0644]
config/rootfiles/common/collectd
config/rootfiles/core/28/filelists/files
lfs/collectd
src/initscripts/init.d/collectd

index 2ac99f6a669c4bb439ec9dbbee853a6ace3f5af3..3785346bac0cabf5eb790d4ceb17f9a3763351cf 100644 (file)
@@ -25,7 +25,6 @@ LoadPlugin processes
 LoadPlugin rrdtool
 LoadPlugin sensors
 LoadPlugin swap
-LoadPlugin thermal
 LoadPlugin syslog
 #LoadPlugin wireless
 
@@ -82,14 +81,4 @@ LoadPlugin syslog
        LogLevel info
 </Plugin>
 
-<Plugin thermal>
-       Device "cooling_device0"
-       Device "cooling_device1"
-       Device "cooling_device2"
-       Device "cooling_device3"
-       Device "cooling_device4"
-       Device "cooling_device5"
-       Device "cooling_device6"
-       Device "cooling_device7"
-       IgnoreSelected true
-</Plugin>
+#include "/etc/collectd.thermal"
diff --git a/config/collectd/collectd.thermal b/config/collectd/collectd.thermal
new file mode 100644 (file)
index 0000000..97403fb
--- /dev/null
@@ -0,0 +1,13 @@
+LoadPlugin thermal
+
+<Plugin thermal>
+       Device "cooling_device0"
+       Device "cooling_device1"
+       Device "cooling_device2"
+       Device "cooling_device3"
+       Device "cooling_device4"
+       Device "cooling_device5"
+       Device "cooling_device6"
+       Device "cooling_device7"
+       IgnoreSelected true
+</Plugin>
index 6a7d9e33e0adc53302833e3039f408ef2fa6fdb1..29160941da4dd74982d99d1d68231b0b136d4493 100644 (file)
@@ -1,4 +1,5 @@
 etc/collectd.conf
+etc/collectd.thermal
 etc/rc.d/init.d/collectd
 etc/rc.d/rc0.d/K50collectd
 etc/rc.d/rc3.d/S21collectd
index c62f6e230d6e02ba99d644610aab4862c14b02d4..6eeb9c8ab5855bec1f7bd5ecc17a6a9d2fa8225d 100644 (file)
@@ -1,7 +1,10 @@
 bin/probenic.sh
+etc/collectd.conf
+etc/collectd.thermal
 etc/ntp
 etc/rc.d/init.d/beep
 etc/rc.d/init.d/console
+etc/rc.d/init.d/collectd
 etc/rc.d/init.d/snort
 etc/rc.d/init.d/networking/red
 etc/ssh/moduli
index 7154b1cd542bd7ea43e247662775bd6ad70d73ab..07dc4d96ed1315f2e4bb3a9291f4f27176b10c2e 100644 (file)
@@ -89,7 +89,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                --enable-{tcpconns,unixsock,users,wireless} \
                --with-rrdtool=/usr/share/rrdtool-1.2.15
        cd $(DIR_APP) && make install
-       cp -vf $(DIR_SRC)/config/collectd/collectd.conf /etc/
+       cp -vf $(DIR_SRC)/config/collectd/collectd.* /etc/
        ln -f -s ../init.d/collectd /etc/rc.d/rc0.d/K50collectd 
        ln -f -s ../init.d/collectd /etc/rc.d/rc3.d/S21collectd
        ln -f -s ../init.d/collectd /etc/rc.d/rc6.d/K50collectd 
index eeaa3860be4cd820331de8e733f45b9b2446c6c7..cf02acbe3e2ab2ccffe5c8e6d2c428e3694c2e17 100644 (file)
@@ -13,7 +13,7 @@ fi
 
 case "$1" in
        start)
-               # If run from init and collectd already started then exit silent
+               # If run from init and collectd alrady started then exit silent
                if [ "$(basename $0)" != "collectd" ]; then
                        if [ "$(ps -A | grep " collectd$")" != "" ]; then
                                exit 0
@@ -43,8 +43,8 @@ case "$1" in
                fi
 
                # Load sensor modules only first start
-               if [ ! -e /var/lock/sensor_modules ]; then
-                       touch /var/lock/sensor_modules
+               if [ ! -e /var/lock/sensors_modules ]; then
+                       touch /var/lock/sensors_modules
                        boot_mesg -n "Loading Sensor Modules: "
                        for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
                        modprobe $modul > /dev/null 2>&1;
@@ -67,9 +67,9 @@ case "$1" in
 
                # Enable thermal plugin if thermal_zone found
                if [ ! -e  /sys/class/thermal/thermal_zone0 ]; then
-                       sed -i -e "s|^LoadPlugin thermal|#LoadPlugin thermal|g" /etc/collectd.conf
+                       sed -i -e 's|^include "/etc/collectd.thermal"$|#include "/etc/collectd.thermal"|g' /etc/collectd.conf
                else
-                       sed -i -e "s|^#LoadPlugin thermal|LoadPlugin thermal|g" /etc/collectd.conf
+                       sed -i -e 's|^#include "/etc/collectd.thermal"$|include "/etc/collectd.thermal"|g' /etc/collectd.conf
                fi
 
                # Enable swap plugin if swap found