Changeset 5765
- Timestamp:
- 09/08/09 18:52:29 (4 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
prog/pwm/fancontrol (modified) (2 diffs)
-
prog/pwm/fancontrol.8 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r5761 r5765 4 4 SVN-HEAD 5 5 libsensors: Support upcoming sysfs path to i2c adapters 6 fancontrol: Check that all referenced sysfs files exist 6 7 pwmconfig: Exit immediately if not root 7 8 sensors.conf.default: Encourage user to not modify this file -
lm-sensors/trunk/prog/pwm/fancontrol
r5764 r5765 153 153 } 154 154 155 # Check that all referenced sysfs files exist 156 function CheckFiles { 157 local outdated=0 158 159 let fcvcount=0 160 while (( $fcvcount < ${#AFCPWM[@]} )) # go through all pwm outputs 161 do 162 pwmo=${AFCPWM[$fcvcount]} 163 if [ ! -w $pwmo ] 164 then 165 echo "Error: file $pwmo doesn't exist" 166 outdated=1 167 fi 168 let fcvcount=$fcvcount+1 169 done 170 171 let fcvcount=0 172 while (( $fcvcount < ${#AFCTEMP[@]} )) # go through all temp inputs 173 do 174 tsen=${AFCTEMP[$fcvcount]} 175 if [ ! -r $tsen ] 176 then 177 echo "Error: file $tsen doesn't exist" 178 outdated=1 179 fi 180 let fcvcount=$fcvcount+1 181 done 182 183 let fcvcount=0 184 while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs 185 do 186 fan=${AFCFAN[$fcvcount]} 187 if [ ! -r $fan ] 188 then 189 echo "Error: file $fan doesn't exist" 190 outdated=1 191 fi 192 let fcvcount=$fcvcount+1 193 done 194 195 if [ $outdated -eq 1 ] 196 then 197 echo 198 echo "At least one referenced file is missing. Either some" 199 echo "required kernel modules haven't been loaded, or your" 200 echo "configuration file is outdated. In the latter case," 201 echo "you should run pwmconfig again." 202 fi 203 204 return $outdated 205 } 206 155 207 if [ -f "$1" ] 156 208 then … … 181 233 fi 182 234 cd $DIR 235 236 CheckFiles || exit 1 183 237 184 238 if [ -f "$PIDFILE" ] -
lm-sensors/trunk/prog/pwm/fancontrol.8
r5717 r5765 1 .TH FANCONTROL 8 " January2009" "lm-sensors 3"1 .TH FANCONTROL 8 "September 2009" "lm-sensors 3" 2 2 .SH NAME 3 3 fancontrol \- automated software based fan speed regulation … … 93 93 editing the config file directly following the rules above. 94 94 95 Upon starting, fancontrol will make sure that all referenced sysfs files 96 do exist. If not, it will quit immediately, upon the assumption that the 97 configuration file may be out-of-sync with the loaded kernel drivers. 98 95 99 .SH THE ALGORITHM 96 100
