Improved sensors-detection at first collectd start

This commit is contained in:
Arne Fitzennreiter
2008-10-25 13:19:54 +02:00
parent f85d3836a0
commit 5b55f2f88d

View File

@@ -16,6 +16,16 @@ case "$1" in
# At first run search for sensors with sensors-detect
if [ ! -e /etc/sysconfig/lm_sensors ]; then
boot_mesg "Searching for Sensors..."
# First scan
"yes" | /usr/sbin/sensors-detect > /dev/null
# Module load
for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
modprobe $modul > /dev/null 2>&1;
done
# Second scan
"yes" | /usr/sbin/sensors-detect > /dev/null
evaluate_retval