User-Agent: Build Identifier: in /etc/sysconfig/lm_sensors the sensors-detect script writes a file detailing which modules to load, it starts with MODULE_0 and goes up, but the initscript starts the loading at 1, so MODULE_0 is never loaded! Also, /etc/sysconfig is not created during merge of lm_sensors! Reproducible: Always Steps to Reproduce: 1. merge lm_sensors-2.7.0 2. mkdir /etc/sysconfig; sensors-detect 3. /etc/init.d/lm_sensors start Actual Results: the first listed module ain't loaded Expected Results: loaded the module This section: i=1 while [ ${i} -le ${modules} ] ; do module=`eval echo '$'MODULE_${i}` ebegin " Loading ${module}" modprobe ${module} &>/dev/null eend $? i=$((i+1)) done Needs to be changed to this: i=0 while [ ${i} -lt ${modules} ] ; do module=`eval echo '$'MODULE_${i}` ebegin " Loading ${module}" modprobe ${module} &>/dev/null eend $? i=$((i+1)) done to fix this. Notice "i=1" becomes "i=0" and "-le" becomes "-lt". Also the ebuild script should mkdir /etc/sysconfig.
I propose a different approach. The grep anc wc -l commands in backquotes are overkill, consider the following. In my opinion, this is clearer, though maybe still not the right way to do it. i=0 while true; do module=`eval echo '$'MODULE_${i}` if [ -z "${module}" ] ; then break fi ebegin " Loading ${module}" modprobe ${module} &>/dev/null eend $? i=$((i+1)) done
Hmm... the init script should be looking in /etc/conf.d for the lm_sensors config file... I don't know why who what (did I?) made it the way it is... and we need to hack up lm_sensors scripts to write that file out to /etc/conf.d I'll try to get to this, but if someone else out there wants to do it, feel free.
Created attachment 8865 [details] Few fixes to lm_sensors-2.7.0 init script and sensors-detect. Unpack, read the README, test. Fixes the original bug, changes the init script and sensors-detect as suggested in comment #2. Time to go to sleep now 8-)
That's "Few fixes...", it's 4AM ;-)
Sorry it's been a while, but that is a .tar.gz, eh? Thanks, I'll look at it like soon.
The .tar.bz2 file contains updated ChangeLog, ebuild, rc script and a petch to lm_sensors.
finally applying, sorry about the delay.