[-]
[+]
|
Changed |
sl-wizard.spec
|
|
[-]
[+]
|
Changed |
gen-dialog-sensors.sh
^
|
@@ -2,6 +2,7 @@
MAPS="/etc/sl-sensors.conf"
#cat $MAPS |awk -F: '{print $1" "$(NF-1)" off"}'
CNT=1
+echo "0 \"Run sensors-detect\" on"
for LINE in `cat $MAPS |awk -F: '{print $(NF-1)}'|sed s/" "/"_"/g`
do
#WRK=`echo $LINE |sed s/"_"/" "/g`
|
[-]
[+]
|
Changed |
select-sensors.sh
^
|
@@ -8,7 +8,7 @@
exit 0
else
-$DIALOG --backtitle "STRESSLiNUX by STRESSLiNUX.ORG (c) 2oo3 - 2oo9" \
+$DIALOG --backtitle "STRESSLiNUX by STRESSLiNUX.ORG (c) 2003 - 2010" \
--title "Hardware Sensors" --clear \
--radiolist "Please select your vendor/mainboard: " 20 75 10 `/bin/bash /usr/bin/gen-dialog-sensors.sh` 2> $tempfile
@@ -19,54 +19,61 @@
0)
clear
config=$choice
- MODS=`cat $CONF | grep "^$config:"| awk -F: '{print $2}'`
- SCONF=`cat $CONF | grep "^$config:" | awk -F: '{print $4}'`
-
- LMODS=`lsmod | awk '{print $1}'|wc -l`
- LMC=`expr $LMODS - 2`
- #for RMOD in `lsmod | awk '{print $1}'| tail -n$LMC`
- #do
- # rmmod $RMOD 2>/dev/null
- #done
-
- # try to remove only sensor modules
- for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/hwmon/*.ko`
- do
- MODNAME=`basename ${RMOD} .ko`
- rmmod $MODNAME 2>/dev/null
- done
- for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/chips/*.ko`
- do
- MODNAME=`basename ${RMOD} .ko`
- rmmod $MODNAME 2>/dev/null
- done
- for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/algos/*.ko`
- do
- MODNAME=`basename ${RMOD} .ko`
- rmmod $MODNAME 2>/dev/null
- done
- for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/busses/*.ko`
- do
- MODNAME=`basename ${RMOD} .ko`
- rmmod $MODNAME 2>/dev/null
- done
-
-
- if [ "`uname -r|awk -F"." '{print $1"."$2}'`" == "2.6" ]; then
- modprobe i2c-sensor 2>/dev/null
+ if [ "$config" == "0" ] ; then
+ # run sensors-detect
+ clear
+ sensors-detect
+ /etc/init.d/lm_sensors start
+ else
+ MODS=`cat $CONF | grep "^$config:"| awk -F: '{print $2}'`
+ SCONF=`cat $CONF | grep "^$config:" | awk -F: '{print $4}'`
+
+ LMODS=`lsmod | awk '{print $1}'|wc -l`
+ LMC=`expr $LMODS - 2`
+ #for RMOD in `lsmod | awk '{print $1}'| tail -n$LMC`
+ #do
+ # rmmod $RMOD 2>/dev/null
+ #done
+
+ # try to remove only sensor modules
+ for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/hwmon/*.ko`
+ do
+ MODNAME=`basename ${RMOD} .ko`
+ rmmod $MODNAME 2>/dev/null
+ done
+ for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/chips/*.ko`
+ do
+ MODNAME=`basename ${RMOD} .ko`
+ rmmod $MODNAME 2>/dev/null
+ done
+ for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/algos/*.ko`
+ do
+ MODNAME=`basename ${RMOD} .ko`
+ rmmod $MODNAME 2>/dev/null
+ done
+ for RMOD in `ls -1A /lib/modules/\`uname -r\`/kernel/drivers/i2c/busses/*.ko`
+ do
+ MODNAME=`basename ${RMOD} .ko`
+ rmmod $MODNAME 2>/dev/null
+ done
+
+
+ if [ "`uname -r|awk -F"." '{print $1"."$2}'`" == "2.6" ]; then
+ modprobe i2c-sensor 2>/dev/null
+ fi
+ for MOD in `echo $MODS|sed s/"\/"/" "/g`
+ do
+ MPL=`echo $MOD|sed s/"#"/" "/g`
+ modprobe $MPL
+ done
+
+ if [ -f /etc/sensors/$SCONF ]; then
+ echo "Copying chipset specific sensors.conf ..."
+ cp /etc/sensors/$SCONF /etc/sensors.conf
+ /usr/bin/sensors -s
+ fi
+ clear
fi
- for MOD in `echo $MODS|sed s/"\/"/" "/g`
- do
- MPL=`echo $MOD|sed s/"#"/" "/g`
- modprobe $MPL
- done
-
- if [ -f /etc/sensors/$SCONF ]; then
- echo "Copying chipset specific sensors.conf ..."
- cp /etc/sensors/$SCONF /etc/sensors.conf
- /usr/bin/sensors -s
- fi
- clear
echo "Switch to console 12 (ALT+F12 -> tty12) to view voltages and temperatures"
echo "Values are updated every two seconds."
touch /tmp/sensors
|