Support new format of /etc/sysconfig/lm_sensors (#2246).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5620 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2009-01-26 15:07:51 +00:00
1 parent a71ca63e00
commit b1b2c6897d
2 files changed
+8 -15

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ SVN-HEAD
Add support for current sensors
Fix error propagation during expression evaluation
Detect excessive recursion depth during expression eval (#2365)
lm_sensors.init: Support new format of /etc/sysconfig/lm_sensors (#2246)
lm_sensors.init.suse: Delete (actual SuSE script is much different)
Makefile: Install sensors.conf.default instead of sensors.conf.eg (#2333)
maxilife scripts: Delete (driver never ported to Linux 2.6)
@@ -56,7 +57,7 @@ SVN-HEAD
Skip IPMI probing on laptops
Add Winbond/Nuvoton W83667HG support
Add Intel Core I7 support
Generate new format for /etc/sysconfig/lm_sensors
Generate new format for /etc/sysconfig/lm_sensors (#2246)
Print warnings about missing modules on screen
Fix detection of older DS1621
Add nNidia nForce MCP67, MCP73, MCP79 SMBus support
+6 -14
View File
@@ -25,9 +25,9 @@
# It uses a config file /etc/sysconfig/lm_sensors that contains the modules
# to be loaded/unloaded. That file is sourced into this one.
# The format of that file a shell script that simply defines the modules
# in order as normal shell variables with the special names:
# MODULE_1, MODULE_2, MODULE_3, etc.
# The format of this file is a shell script that simply defines variables:
# HWMON_MODULES for hardware monitoring driver modules, and optionally
# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
PSENSORS=/usr/local/bin/sensors
@@ -68,7 +68,7 @@ check_sensors() {
fi
CONFIG=/etc/sysconfig/lm_sensors
if ! [ -r "$CONFIG" ] || ! grep '^MODULE_' $CONFIG >/dev/null 2>&1; then
if ! [ -r "$CONFIG" ] || ! grep '^HWMON_MODULES' $CONFIG >/dev/null 2>&1; then
echo -n "$1 $prog: not configured, run sensors-detect"
echo_warning
echo
@@ -84,13 +84,9 @@ start() {
echo -n "Starting $prog: loading module "
modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '`
i=0
while [ $i -lt $modules ] ; do
module=`eval echo '$'MODULE_$i`
for module in $BUS_MODULES $HWMON_MODULES ; do
echo -n "${module} "
/sbin/modprobe $module >/dev/null 2>&1
i=`expr $i + 1`
done
$PSENSORS -s
@@ -109,12 +105,8 @@ stop() {
echo -n "Stopping $prog: "
modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '`
i=`expr $modules`
while [ $i -ge 0 ] ; do
module=`eval echo '$'MODULE_$i`
for module in $HWMON_MODULES $BUS_MODULES ; do
/sbin/modprobe -r $module >/dev/null 2>&1
i=`expr $i - 1`
done
if [ $WITHSYS == "0" ]; then