*** /usr/sbin/fancontrol-ORG Sun Jun 3 16:23:37 2012 --- /usr/sbin/fancontrol Fri Sep 20 23:04:53 2013 *************** *** 67,72 **** --- 67,124 ---- MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'` MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'` + if [ `uname -n` = "srosa" ]; then + tmonitor="" + tdevpath="" + tdevname="" + for d in /sys/class/hwmon/hwmon[0-9] ; do + test -d ${d} || continue + moni=`basename ${d}` + path="${d}/device" + name="coretemp" + test -d ${path} || continue + test -e ${path}/name || continue + test `cat ${path}/name` = "${name}" || continue + tmonitor="${moni}" + tdevpath="${path}" + tdevname="${name}" + done + fmonitor="" + fdevpath="" + fdevname="" + for d in /sys/class/hwmon/hwmon[0-9] ; do + test -d ${d} || continue + moni=`basename ${d}` + path="${d}" + name="eeepc" + test -d ${path} || continue + test -e ${path}/name || continue + test `cat ${path}/name` = "${name}" || continue + fmonitor="${moni}" + fdevpath="${path}" + fdevname="${name}" + done + tmp=`ls ${tdevpath}/temp[0-9]_input 2>/dev/null | sed -n '1p'` + fan=`ls ${fdevpath}/fan[0-9]_input 2>/dev/null | sed -n '1p'` + pwm=`ls ${fdevpath}/pwm[0-9] 2>/dev/null | sed -n '1p'` + tmp=`echo "${tmp}" | sed 's,/sys/class/hwmon/,,'` + fan=`echo "${fan}" | sed 's,/sys/class/hwmon/,,'` + pwm=`echo "${pwm}" | sed 's,/sys/class/hwmon/,,'` + otdevpath=`cd /sys && ls -d devices/platform/${tdevname}* | sed -n '1p'` + ofdevpath=`cd /sys && ls -d devices/platform/${fdevname}* | sed -n '1p'` + INTERVAL="10" + DEVPATH="${tmonitor}=${otdevpath} ${fmonitor}=${ofdevpath}" + DEVNAME="${tmonitor}=${tdevname} ${fmonitor}=${fdevname}" + FCTEMPS="${pwm}=${tmp}" + FCFANS="${pwm}=${fan}" + MINTEMP="${pwm}=20" + MAXTEMP="${pwm}=40" + MINSTART="${pwm}=127" + MINSTOP="${pwm}=95" + MINPWM="${pwm}=63" + MAXPWM="${pwm}=255" + fi + # Check whether all mandatory settings are set if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] then