Changeset 4295
- Timestamp:
- 01/14/07 16:20:06 (2 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/prog/pwm/fancontrol.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r4292 r4295 33 33 Programs pwmconfig, fancontrol: Handle write errors for bash 3.1 34 34 Add support for non-i2c drivers 35 Program fancontrol.pl: Disable debugging by default 36 Add support for non-i2c drivers 37 More tolerant config file parsing 35 38 Program sensord: Add pc87247 support (fans only) 36 39 Add vt1211 support (#2150) lm-sensors/trunk/prog/pwm/fancontrol.pl
r3025 r4295 48 48 49 49 ##### Configuration ##### 50 use constant DEBUG => 1;50 use constant DEBUG => 0; 51 51 use constant MAX => 255; 52 52 … … 55 55 use constant LOGFILE => '/var/log/fancontrol/fancontrol.log'; 56 56 use constant ERRFILE => '/var/log/fancontrol/fancontrol.err'; 57 58 use constant SDIR => '/sys/bus/i2c/devices';59 57 ### End Configuration ### 60 58 … … 120 118 if (!(-d $dir)) 121 119 { 122 if (!(-d SDIR)) 120 if ($afcpwm[0] =~ m/^hwmon\d/) 121 { 122 $dir = '/sys/class/hwmon'; 123 } 124 else 125 { 126 $dir = '/sys/bus/i2c/devices'; 127 } 128 129 if (!(-d $dir)) 123 130 { die("No sensors found! (are the necessary modules loaded?) : 124 131 $!\n"); } … … 126 133 { 127 134 $sysfs = 1; 128 $dir = SDIR;129 135 } 130 136 } … … 174 180 { 175 181 if ($_ =~ /^\s+$/) { next; } 176 elsif ($_ =~ /^INTERVAL= (.*)$/) { $interval = $1; next; }177 elsif ($_ =~ /^FCTEMPS= (.*)$/) { $fctemps = $1; next; }178 elsif ($_ =~ /^FCFANS= (.*)$/) { $fcfans = $1; next; }179 elsif ($_ =~ /^MINTEMP= (.*)$/) { $mintemp = $1; next; }180 elsif ($_ =~ /^MAXTEMP= (.*)$/) { $maxtemp = $1; next; }181 elsif ($_ =~ /^MINSTART= (.*)$/) { $minstart = $1; next; }182 elsif ($_ =~ /^MINSTOP= (.*)$/) { $minstop = $1; next; }182 elsif ($_ =~ /^INTERVAL=\s*(.*)$/) { $interval = $1; next; } 183 elsif ($_ =~ /^FCTEMPS=\s*(.*)$/) { $fctemps = $1; next; } 184 elsif ($_ =~ /^FCFANS=\s*(.*)$/) { $fcfans = $1; next; } 185 elsif ($_ =~ /^MINTEMP=\s*(.*)$/) { $mintemp = $1; next; } 186 elsif ($_ =~ /^MAXTEMP=\s*(.*)$/) { $maxtemp = $1; next; } 187 elsif ($_ =~ /^MINSTART=\s*(.*)$/) { $minstart = $1; next; } 188 elsif ($_ =~ /^MINSTOP=\s*(.*)$/) { $minstop = $1; next; } 183 189 } 184 190 close(F);
