Drop legacy calls to cut. procfs had several values per file, but

sysfs doesn't.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5857 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2010-08-22 16:17:57 +00:00
1 parent 501499e834
commit fffbe666c4
2 files changed
+5 -7

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ SVN HEAD
Change license to LGPL
pwmconfig: Sample all fan speeds before returning to full speed (#2380)
Wait for fans to return to full speed only once per PWM
Drop legacy invocations of cut
sensors.conf.default: W83667HG config is similar to W83627EHF/DHG
sensord: Fix support of multiple chips (#2377)
sensors: Properly handle sensor input read errors
+4 -7
View File
@@ -280,8 +280,7 @@ sleep $DELAY
echo 'Found the following fan sensors:'
for i in $FAN
do
# this will return the first field if there's only one (sysfs)
S=`cat $i | cut -d' ' -f2`
S=`cat $i`
if [ "$S" = "0" -o "$S" = "-1" ]
then
echo " $i current speed: 0 ... skipping!"
@@ -373,8 +372,7 @@ function pwmdetail()
rm -f $TMP1 $TMP2
exit 1
fi
# this will return the first field if there's only one (sysfs)
S=`cat $F | cut -d' ' -f2`
S=`cat $F`
# Fan speed should never increase significantly
if [ $S -gt $threshold ]
then
@@ -476,8 +474,7 @@ do
fanactive="$j+${fanactive}" #not supported yet by fancontrol
fanactive_min="$S+${fanactive_min}"
fi
# this will return the first field if there's only one (sysfs)
S=`cat $j | cut -d' ' -f2`
S=`cat $j`
if [ $S -lt $threshold ]
then
echo " Fan $j has not returned to speed, please investigate!"
@@ -701,7 +698,7 @@ function TestMinStop()
do
pwmset $pwms $fanval
sleep $PDELAY
fanspeed=`cat $faninput | cut -d' ' -f2`
fanspeed=`cat $faninput`
if [ $fanspeed -gt $threshold ]
then
echo " PWM $fanval -> $fanspeed RPM (probably incorrect)"