Changeset 5330

Show
Ignore:
Timestamp:
09/09/08 18:18:27 (5 years ago)
Author:
khali
Message:

Strip trailing whitespace.

Location:
lm-sensors/branches/lm-sensors-3.0.0/prog/pwm
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol

    r5271 r5330  
    6565        MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'` 
    6666        MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'` 
    67          
     67 
    6868        # Check whether all mandatory settings are set 
    6969        if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] 
     
    8080 
    8181        # write settings to arrays for easier use and print them 
    82         echo 
     82        echo 
    8383        echo "Common settings:" 
    8484        echo "  INTERVAL=$INTERVAL" 
    85                                                  
     85 
    8686        let fcvcount=0 
    8787        for fcv in $FCTEMPS 
     
    154154 
    155155if [ -f "$1" ] 
    156 then  
     156then 
    157157        LoadConfig $1 
    158158else 
     
    178178                SYSFS=1 
    179179                DIR=$SDIR 
    180         fi       
     180        fi 
    181181fi 
    182182cd $DIR 
     
    274274                minpwm=${AFCMINPWM[$fcvcount]} 
    275275                maxpwm=${AFCMAXPWM[$fcvcount]} 
    276                  
     276 
    277277                read tval < ${tsens} 
    278278                if [ $? -ne 0 ] 
     
    298298                        pwmpval=`echo ${pwmpval} | cut -d' ' -f1` 
    299299                fi 
    300                  
     300 
    301301                # If fanspeed-sensor output shall be used, do it 
    302302                if [[ -n ${fan} ]] 
     
    315315                        fanval=1  # set it to a non zero value, so the rest of the script still works 
    316316                fi 
    317                  
     317 
    318318                # debug info 
    319319                if [ "$DEBUG" != "" ] 
     
    332332                        echo "fanval=$fanval" 
    333333                fi 
    334                  
     334 
    335335                if (( $tval <= $mint )) 
    336336                  then pwmval=$minpwm # below min temp, use defined min pwm 
    337337                elif (( $tval >= $maxt )) 
    338338                  then pwmval=$maxpwm # over max temp, use defined max pwm 
    339                 else  
     339                else 
    340340                  # calculate the new value from temperature and settings 
    341341                  pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol.8

    r4699 r5330  
    2626.SH CONFIGURATION 
    2727For easy configuration, there's a script 
    28 named \fBpwmconfig\fP(8) which lets you interactively write your  
    29 configuration file for \fBfancontrol\fP. Alternatively you can write this  
     28named \fBpwmconfig\fP(8) which lets you interactively write your 
     29configuration file for \fBfancontrol\fP. Alternatively you can write this 
    3030file yourself using the information from this manpage. 
    3131 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig

    r5329 r5330  
    7272                echo $0: 'No sensors found! (modprobe sensor modules?)' 
    7373                exit 1 
    74         fi       
     74        fi 
    7575fi 
    7676 
     
    332332                if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ] 
    333333                then 
    334                         PLOT=y           
     334                        PLOT=y 
    335335                fi 
    336336        else 
     
    359359        while [ $pwm -ge 0 ] 
    360360        do 
    361                 pwmset $P $pwm   
     361                pwmset $P $pwm 
    362362                sleep $PDELAY 
    363363                if [ $? -ne 0 ] 
    364364                then 
    365                         pwmdisable $P    
     365                        pwmdisable $P 
    366366                        echo '^C received, aborting...' 
    367367                        rm -f $TMP1 $TMP2 
    368368                        exit 1 
    369                 fi               
     369                fi 
    370370                # this will return the first field if there's only one (sysfs) 
    371371                S=`cat $F | cut -d' ' -f2` 
     
    385385                if [ "$S" = "0" -o "$S" = "-1" ] 
    386386                then 
    387                         pwmdisable $P    
     387                        pwmdisable $P 
    388388                        echo "    Fan Stopped at PWM = $pwm" 
    389389                        if [ $pwm -eq $MAX ] 
     
    406406                fi 
    407407        done 
    408         pwmdisable $P    
     408        pwmdisable $P 
    409409        if [ "$PLOT" = "y" ] 
    410410        then 
     
    431431                echo '^C received, restoring PWM and aborting...' 
    432432                exit 1 
    433         fi               
     433        fi 
    434434        let pwmactivecount=0 
    435435        let count=1 
     
    464464                                echo '^C received, aborting...' 
    465465                                exit 1 
    466                         fi               
     466                        fi 
    467467                        # this will return the first field if there's only one (sysfs) 
    468468                        S=`cat $j | cut -d' ' -f2` 
     
    766766                        if [ "$tempss" = "None (Do not affect this PWM output)" ] 
    767767                        then 
    768                          
     768 
    769769                                break; 
    770770                        else 
     
    892892                done 
    893893                break ;; 
    894          
     894 
    895895        *) 
    896896                echo "No such option. Enter a number." 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig.8

    r4699 r5330  
    1515It attempts to briefly stop each fan using the PWM controls. It then 
    1616attempts to restore each fan to full speed after testing. However, it 
    17 is \fBvery important\fP that you physically verify that the fans have  
     17is \fBvery important\fP that you physically verify that the fans have 
    1818been returned to full speed after the program has completed. 
    1919 
    2020.SH WARNING 
    2121This program will stop your fans, one at a time, for approximately 5 seconds each. 
    22 This may cause your processor temperature to rise. Verify that all fans are running  
     22This may cause your processor temperature to rise. Verify that all fans are running 
    2323at normal speed after this program has exited. 
    2424