From 8f9a67f5bddd629bcd5dadc0e5166937de281081 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 9 Sep 2008 16:18:27 +0000 Subject: [PATCH] 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 --- prog/pwm/fancontrol | 20 ++++++++++---------- prog/pwm/fancontrol.8 | 4 ++-- prog/pwm/pwmconfig | 22 +++++++++++----------- prog/pwm/pwmconfig.8 | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/prog/pwm/fancontrol b/prog/pwm/fancontrol index 4d1bca00..aca7b2c9 100755 --- a/prog/pwm/fancontrol +++ b/prog/pwm/fancontrol @@ -64,7 +64,7 @@ function LoadConfig { FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'` MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'` MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'` - + # Check whether all mandatory settings are set if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] then @@ -79,10 +79,10 @@ function LoadConfig { fi # write settings to arrays for easier use and print them - echo + echo echo "Common settings:" echo " INTERVAL=$INTERVAL" - + let fcvcount=0 for fcv in $FCTEMPS do @@ -153,7 +153,7 @@ function LoadConfig { } if [ -f "$1" ] -then +then LoadConfig $1 else LoadConfig /etc/fancontrol @@ -177,7 +177,7 @@ then else SYSFS=1 DIR=$SDIR - fi + fi fi cd $DIR @@ -273,7 +273,7 @@ function UpdateFanSpeeds { minso=${AFCMINSTOP[$fcvcount]} minpwm=${AFCMINPWM[$fcvcount]} maxpwm=${AFCMAXPWM[$fcvcount]} - + read tval < ${tsens} if [ $? -ne 0 ] then @@ -297,7 +297,7 @@ function UpdateFanSpeeds { then pwmpval=`echo ${pwmpval} | cut -d' ' -f1` fi - + # If fanspeed-sensor output shall be used, do it if [[ -n ${fan} ]] then @@ -314,7 +314,7 @@ function UpdateFanSpeeds { else fanval=1 # set it to a non zero value, so the rest of the script still works fi - + # debug info if [ "$DEBUG" != "" ] then @@ -331,12 +331,12 @@ function UpdateFanSpeeds { echo "pwmpval=$pwmpval" echo "fanval=$fanval" fi - + if (( $tval <= $mint )) then pwmval=$minpwm # below min temp, use defined min pwm elif (( $tval >= $maxt )) then pwmval=$maxpwm # over max temp, use defined max pwm - else + else # calculate the new value from temperature and settings pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" if [ $pwmpval -eq 0 -o $fanval -eq 0 ] diff --git a/prog/pwm/fancontrol.8 b/prog/pwm/fancontrol.8 index e7a5385f..6a47fb9e 100644 --- a/prog/pwm/fancontrol.8 +++ b/prog/pwm/fancontrol.8 @@ -25,8 +25,8 @@ some fan fails, because you probably won't hear it anymore ;) .SH CONFIGURATION For easy configuration, there's a script -named \fBpwmconfig\fP(8) which lets you interactively write your -configuration file for \fBfancontrol\fP. Alternatively you can write this +named \fBpwmconfig\fP(8) which lets you interactively write your +configuration file for \fBfancontrol\fP. Alternatively you can write this file yourself using the information from this manpage. Since most of you are going to use \fBpwmconfig\fP(8) script, the config diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index e3ed3294..3c69e868 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -71,7 +71,7 @@ then else echo $0: 'No sensors found! (modprobe sensor modules?)' exit 1 - fi + fi fi cd $DIR @@ -331,7 +331,7 @@ function pwmdetail() read X if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ] then - PLOT=y + PLOT=y fi else if [ -n "$DISPLAY" ] @@ -358,15 +358,15 @@ function pwmdetail() pwmenable $P while [ $pwm -ge 0 ] do - pwmset $P $pwm + pwmset $P $pwm sleep $PDELAY if [ $? -ne 0 ] then - pwmdisable $P + pwmdisable $P echo '^C received, aborting...' rm -f $TMP1 $TMP2 exit 1 - fi + fi # this will return the first field if there's only one (sysfs) S=`cat $F | cut -d' ' -f2` # Fan speed should never increase significantly @@ -384,7 +384,7 @@ function pwmdetail() fi if [ "$S" = "0" -o "$S" = "-1" ] then - pwmdisable $P + pwmdisable $P echo " Fan Stopped at PWM = $pwm" if [ $pwm -eq $MAX ] then @@ -405,7 +405,7 @@ function pwmdetail() let pwm=$pwm-$STEP fi done - pwmdisable $P + pwmdisable $P if [ "$PLOT" = "y" ] then $PLOTTER $TMP1 @@ -430,7 +430,7 @@ do pwmdisable $i echo '^C received, restoring PWM and aborting...' exit 1 - fi + fi let pwmactivecount=0 let count=1 for j in $GOODFAN @@ -463,7 +463,7 @@ do then echo '^C received, aborting...' exit 1 - fi + fi # this will return the first field if there's only one (sysfs) S=`cat $j | cut -d' ' -f2` 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 if [ "$tempss" = "None (Do not affect this PWM output)" ] then - + break; else if [ "$FCTEMPS" = "" ] @@ -891,7 +891,7 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co break; done break ;; - + *) echo "No such option. Enter a number." break ;; diff --git a/prog/pwm/pwmconfig.8 b/prog/pwm/pwmconfig.8 index a535d309..f95485cc 100644 --- a/prog/pwm/pwmconfig.8 +++ b/prog/pwm/pwmconfig.8 @@ -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 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. .SH WARNING 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. .SH SEE ALSO