Detect improperly formatted FCTEMPS value (#2293).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5102 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-01-09 10:59:48 +00:00
1 parent e6c94c66ed
commit 8d00528cd3
2 files changed
+8

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ SVN
Deal gracefully with read-only pwm_enable files Deal gracefully with read-only pwm_enable files
Warn about outputs found in automatic mode Warn about outputs found in automatic mode
Repeat available configuration options before prompt (#2289) Repeat available configuration options before prompt (#2289)
fancontrol: Detect improperly formatted FCTEMPS value (#2293)
sensord: Fix rrd support (#2276) sensord: Fix rrd support (#2276)
Use the same colors for daily and weekly charts Use the same colors for daily and weekly charts
Drop workaround needed by old versions of rrdtool Drop workaround needed by old versions of rrdtool
+7
View File
@@ -82,6 +82,13 @@ function LoadConfig {
let fcvcount=0 let fcvcount=0
for fcv in $FCTEMPS for fcv in $FCTEMPS
do do
if ! echo $fcv | egrep -q '='
then
echo "Error in configuration file:"
echo "FCTEMPS value is improperly formatted"
exit 1
fi
AFCPWM[$fcvcount]=`echo $fcv |cut -d'=' -f1` AFCPWM[$fcvcount]=`echo $fcv |cut -d'=' -f1`
AFCTEMP[$fcvcount]=`echo $fcv |cut -d'=' -f2` AFCTEMP[$fcvcount]=`echo $fcv |cut -d'=' -f2`
AFCFAN[$fcvcount]=`echo $FCFANS |sed -e 's/ /\n/g' |egrep "${AFCPWM[$fcvcount]}" |cut -d'=' -f2` AFCFAN[$fcvcount]=`echo $FCFANS |sed -e 's/ /\n/g' |egrep "${AFCPWM[$fcvcount]}" |cut -d'=' -f2`