Changes of Revision 2
[-] [+] | Changed | sl-wizard.spec |
[-] [+] | Changed | select-sensors.sh ^ |
@@ -24,10 +24,34 @@ LMODS=`lsmod | awk '{print $1}'|wc -l` LMC=`expr $LMODS - 2` - for RMOD in `lsmod | awk '{print $1}'| tail -n$LMC` + #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 - rmmod $RMOD 2>/dev/null + 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 |