Strip trailing whitespace.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5330 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-09-09 16:18:27 +00:00
1 parent 78e6d49180
commit 8f9a67f5bd
4 files changed
+25 -25

No files matched your search

+10 -10
View File
@@ -64,7 +64,7 @@ function LoadConfig {
FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'` FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'`
MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'` MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'`
MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'` MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'`
# Check whether all mandatory settings are set # Check whether all mandatory settings are set
if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]]
then then
@@ -79,10 +79,10 @@ function LoadConfig {
fi fi
# write settings to arrays for easier use and print them # write settings to arrays for easier use and print them
echo echo
echo "Common settings:" echo "Common settings:"
echo " INTERVAL=$INTERVAL" echo " INTERVAL=$INTERVAL"
let fcvcount=0 let fcvcount=0
for fcv in $FCTEMPS for fcv in $FCTEMPS
do do
@@ -153,7 +153,7 @@ function LoadConfig {
} }
if [ -f "$1" ] if [ -f "$1" ]
then then
LoadConfig $1 LoadConfig $1
else else
LoadConfig /etc/fancontrol LoadConfig /etc/fancontrol
@@ -177,7 +177,7 @@ then
else else
SYSFS=1 SYSFS=1
DIR=$SDIR DIR=$SDIR
fi fi
fi fi
cd $DIR cd $DIR
@@ -273,7 +273,7 @@ function UpdateFanSpeeds {
minso=${AFCMINSTOP[$fcvcount]} minso=${AFCMINSTOP[$fcvcount]}
minpwm=${AFCMINPWM[$fcvcount]} minpwm=${AFCMINPWM[$fcvcount]}
maxpwm=${AFCMAXPWM[$fcvcount]} maxpwm=${AFCMAXPWM[$fcvcount]}
read tval < ${tsens} read tval < ${tsens}
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
@@ -297,7 +297,7 @@ function UpdateFanSpeeds {
then then
pwmpval=`echo ${pwmpval} | cut -d' ' -f1` pwmpval=`echo ${pwmpval} | cut -d' ' -f1`
fi fi
# If fanspeed-sensor output shall be used, do it # If fanspeed-sensor output shall be used, do it
if [[ -n ${fan} ]] if [[ -n ${fan} ]]
then then
@@ -314,7 +314,7 @@ function UpdateFanSpeeds {
else else
fanval=1 # set it to a non zero value, so the rest of the script still works fanval=1 # set it to a non zero value, so the rest of the script still works
fi fi
# debug info # debug info
if [ "$DEBUG" != "" ] if [ "$DEBUG" != "" ]
then then
@@ -331,12 +331,12 @@ function UpdateFanSpeeds {
echo "pwmpval=$pwmpval" echo "pwmpval=$pwmpval"
echo "fanval=$fanval" echo "fanval=$fanval"
fi fi
if (( $tval <= $mint )) if (( $tval <= $mint ))
then pwmval=$minpwm # below min temp, use defined min pwm then pwmval=$minpwm # below min temp, use defined min pwm
elif (( $tval >= $maxt )) elif (( $tval >= $maxt ))
then pwmval=$maxpwm # over max temp, use defined max pwm then pwmval=$maxpwm # over max temp, use defined max pwm
else else
# calculate the new value from temperature and settings # calculate the new value from temperature and settings
pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
if [ $pwmpval -eq 0 -o $fanval -eq 0 ] if [ $pwmpval -eq 0 -o $fanval -eq 0 ]
+2 -2
View File
@@ -25,8 +25,8 @@ some fan fails, because you probably won't hear it anymore ;)
.SH CONFIGURATION .SH CONFIGURATION
For easy configuration, there's a script For easy configuration, there's a script
named \fBpwmconfig\fP(8) which lets you interactively write your named \fBpwmconfig\fP(8) which lets you interactively write your
configuration file for \fBfancontrol\fP. Alternatively you can write this configuration file for \fBfancontrol\fP. Alternatively you can write this
file yourself using the information from this manpage. file yourself using the information from this manpage.
Since most of you are going to use \fBpwmconfig\fP(8) script, the config Since most of you are going to use \fBpwmconfig\fP(8) script, the config
+11 -11
View File
@@ -71,7 +71,7 @@ then
else else
echo $0: 'No sensors found! (modprobe sensor modules?)' echo $0: 'No sensors found! (modprobe sensor modules?)'
exit 1 exit 1
fi fi
fi fi
cd $DIR cd $DIR
@@ -331,7 +331,7 @@ function pwmdetail()
read X read X
if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ] if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ]
then then
PLOT=y PLOT=y
fi fi
else else
if [ -n "$DISPLAY" ] if [ -n "$DISPLAY" ]
@@ -358,15 +358,15 @@ function pwmdetail()
pwmenable $P pwmenable $P
while [ $pwm -ge 0 ] while [ $pwm -ge 0 ]
do do
pwmset $P $pwm pwmset $P $pwm
sleep $PDELAY sleep $PDELAY
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
pwmdisable $P pwmdisable $P
echo '^C received, aborting...' echo '^C received, aborting...'
rm -f $TMP1 $TMP2 rm -f $TMP1 $TMP2
exit 1 exit 1
fi fi
# this will return the first field if there's only one (sysfs) # this will return the first field if there's only one (sysfs)
S=`cat $F | cut -d' ' -f2` S=`cat $F | cut -d' ' -f2`
# Fan speed should never increase significantly # Fan speed should never increase significantly
@@ -384,7 +384,7 @@ function pwmdetail()
fi fi
if [ "$S" = "0" -o "$S" = "-1" ] if [ "$S" = "0" -o "$S" = "-1" ]
then then
pwmdisable $P pwmdisable $P
echo " Fan Stopped at PWM = $pwm" echo " Fan Stopped at PWM = $pwm"
if [ $pwm -eq $MAX ] if [ $pwm -eq $MAX ]
then then
@@ -405,7 +405,7 @@ function pwmdetail()
let pwm=$pwm-$STEP let pwm=$pwm-$STEP
fi fi
done done
pwmdisable $P pwmdisable $P
if [ "$PLOT" = "y" ] if [ "$PLOT" = "y" ]
then then
$PLOTTER $TMP1 $PLOTTER $TMP1
@@ -430,7 +430,7 @@ do
pwmdisable $i pwmdisable $i
echo '^C received, restoring PWM and aborting...' echo '^C received, restoring PWM and aborting...'
exit 1 exit 1
fi fi
let pwmactivecount=0 let pwmactivecount=0
let count=1 let count=1
for j in $GOODFAN for j in $GOODFAN
@@ -463,7 +463,7 @@ do
then then
echo '^C received, aborting...' echo '^C received, aborting...'
exit 1 exit 1
fi fi
# this will return the first field if there's only one (sysfs) # this will return the first field if there's only one (sysfs)
S=`cat $j | cut -d' ' -f2` S=`cat $j | cut -d' ' -f2`
if [ $S -lt $threshold ] if [ $S -lt $threshold ]
@@ -765,7 +765,7 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
select tempss in $TEMPS "None (Do not affect this PWM output)"; do select tempss in $TEMPS "None (Do not affect this PWM output)"; do
if [ "$tempss" = "None (Do not affect this PWM output)" ] if [ "$tempss" = "None (Do not affect this PWM output)" ]
then then
break; break;
else else
if [ "$FCTEMPS" = "" ] if [ "$FCTEMPS" = "" ]
@@ -891,7 +891,7 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
break; break;
done done
break ;; break ;;
*) *)
echo "No such option. Enter a number." echo "No such option. Enter a number."
break ;; break ;;
+2 -2
View File
@@ -14,12 +14,12 @@ circuitry installed, even if your sensor chip supports PWM.
It attempts to briefly stop each fan using the PWM controls. It then It attempts to briefly stop each fan using the PWM controls. It then
attempts to restore each fan to full speed after testing. However, it attempts to restore each fan to full speed after testing. However, it
is \fBvery important\fP that you physically verify that the fans have is \fBvery important\fP that you physically verify that the fans have
been returned to full speed after the program has completed. been returned to full speed after the program has completed.
.SH WARNING .SH WARNING
This program will stop your fans, one at a time, for approximately 5 seconds each. This program will stop your fans, one at a time, for approximately 5 seconds each.
This may cause your processor temperature to rise. Verify that all fans are running This may cause your processor temperature to rise. Verify that all fans are running
at normal speed after this program has exited. at normal speed after this program has exited.
.SH SEE ALSO .SH SEE ALSO