mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Fix collectd initskript not found sysconfig/lm_sensors
at first sensorscan if no sensors are found Change colour of not supported modules to yellow
This commit is contained in:
@@ -17,15 +17,16 @@ case "$1" in
|
|||||||
if [ ! -e /etc/sysconfig/lm_sensors ]; then
|
if [ ! -e /etc/sysconfig/lm_sensors ]; then
|
||||||
boot_mesg "Searching for Sensors..."
|
boot_mesg "Searching for Sensors..."
|
||||||
|
|
||||||
# First scan
|
# pre scan and try to load modules
|
||||||
"yes" | /usr/sbin/sensors-detect > /dev/null
|
"yes" | /usr/sbin/sensors-detect > /dev/null
|
||||||
|
if [ -e /etc/sysconfig/lm_sensors ]; then
|
||||||
|
# Module load
|
||||||
|
for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
|
||||||
|
modprobe $modul > /dev/null 2>&1;
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Module load
|
# Final scan
|
||||||
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
|
"yes" | /usr/sbin/sensors-detect > /dev/null
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
|
|
||||||
@@ -34,13 +35,13 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
boot_mesg -n "Loading Sensor Modules..."
|
boot_mesg -n "Loading Sensor Modules: "
|
||||||
for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
|
for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do
|
||||||
modprobe $modul > /dev/null 2>&1;
|
modprobe $modul > /dev/null 2>&1;
|
||||||
if [ ${?} = 0 ]; then
|
if [ ${?} = 0 ]; then
|
||||||
boot_mesg -n "$SUCCESS$modul$NORMAL ";
|
boot_mesg -n "$SUCCESS$modul$NORMAL ";
|
||||||
else
|
else
|
||||||
boot_mesg -n "$FAILURE$modul$NORMAL ";
|
boot_mesg -n "$WARNING$modul$NORMAL ";
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
boot_mesg;
|
boot_mesg;
|
||||||
|
|||||||
Reference in New Issue
Block a user