Changeset 4439
- Timestamp:
- 06/12/07 13:26:11 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/pwm/fancontrol (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4438 r4439 20 20 Check for configuration file validity 21 21 Support optional min and max PWM values 22 Better integration with init scripts 22 23 Program pwmconfig: Use smaller steps for low PWM values 23 24 Support optional min and max PWM values -
lm-sensors/trunk/prog/pwm/fancontrol
r4438 r4439 229 229 function restorefans() 230 230 { 231 local status=$1 231 232 echo 'Aborting, restoring fans...' 232 233 let fcvcount=0 … … 238 239 done 239 240 echo 'Verify fans have returned to full speed' 240 exit 1 241 } 242 243 trap restorefans SIGHUP SIGINT SIGQUIT SIGTERM SIGKILL 241 exit $status 242 } 243 244 trap 'restorefans 0' SIGQUIT SIGTERM 245 trap 'restorefans 1' SIGHUP SIGINT 244 246 245 247 # main function … … 263 265 then 264 266 echo "Error reading temperature from $DIR/$tsens" 265 restorefans 267 restorefans 1 266 268 fi 267 269 if [ "$SYSFS" = "1" ] … … 276 278 then 277 279 echo "Error reading PWM value from $DIR/$pwmo" 278 restorefans 280 restorefans 1 279 281 fi 280 282 if [ "$SYSFS" != "1" ] … … 290 292 then 291 293 echo "Error reading Fan value from $DIR/$fan" 292 restorefans 294 restorefans 1 293 295 fi 294 296 if [ "$SYSFS" != "1" ] … … 327 329 then # if fan was stopped start it using a safe value 328 330 echo $minsa > $pwmo 329 sleep 1 331 # Sleep while still handling signals 332 read < <(exec sleep 1) 330 333 fi 331 334 fi … … 334 337 then 335 338 echo "Error writing PWM value to $DIR/$pwmo" 336 restorefans 339 restorefans 1 337 340 fi 338 341 if [ "$DEBUG" != "" ] … … 353 356 then 354 357 echo "Error enabling PWM on $DIR/$pwmo" 355 restorefans 358 restorefans 1 356 359 fi 357 360 let fcvcount=$fcvcount+1 … … 364 367 do 365 368 UpdateFanSpeeds 366 sleep $INTERVAL 369 # Sleep while still handling signals 370 read < <(exec sleep $INTERVAL) 367 371 done
