#!/bin/sh # K.H. Jensen 2008 # eeefan - eee pc 901 / 1000 / 1000H fan control utility temperature_reading=/proc/eee/temperature fan_control=/proc/eee/fan_speed fan_manual_switch=/proc/eee/fan_manual # Set critical temperature where the fan starts TEMP_CRITICAL=62 # Set fan speed above TEMP_CRITICAL FAN_SPEED_CRITICAL=65 # Set fan speed below TEMP_CRITICAL FAN_SPEED_SUBCRITICAL=25 eeefanupdate() { # Get temperature reading TEMP=$(cat $temperature_reading) # Compa re to the critical temperature if [ $TEMP -ge $TEMP_CRITICAL ];then # High fan speed echo $FAN_SPEED_CRITICAL > $fan_control else # Low fan speed echo $FAN_SPEED_SUBCRITICAL > $fan_control fi } # cron jobs can only be executed once every minute, # so we have to use the sleep command # Turn on manual fan control echo 1 > $fan_manual_switch # Run eeefan, then wait 10 seconds. eeefanupdate sleep 10 eeefanupdate sleep 10 eeefanupdate sleep 10 eeefanupdate sleep 10 eeefanupdate