Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 140051

Summary: lm_sensors init script does modprobe but doesn't rmmod
Product: Gentoo Linux Reporter: lefti <lefti>
Component: New packagesAssignee: Christian Heim (RETIRED) <phreak>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description lefti 2006-07-11 16:29:01 UTC
In /etc/init.d/lm_sensors is\ 'ebegin "  Loading i2c-core"
modprobe i2c-core &> /dev/null' in start(), but there isn't rmmod in stop()  (with check in start(), if module is already loaded).
And i also think modules, which is loaded as dependecies for MODULE_n in conf.d/lm_sensors, aren't rmmomded on stop() too.
Comment 1 Christian Heim (RETIRED) gentoo-dev 2006-07-15 15:53:51 UTC
Well, the MODULE_n's from the config are unloaded on stop ..

  81                 # find the highest possible MODULE_ number
  82                 i=0
  83                 while true; do
  84                         module=`eval echo '$'MODULE_${i}`
  85                         if [ -z "${module}" ] ; then
  86                                 break
  87                         fi
  88                         i=$((i+1))
  89                 done
  90
  91                 while [ ${i} -gt 0 ]; do
  92                         i=$((i-1))
  93                         module=`eval echo '$'MODULE_${i}`
  94                         ebegin "  Unloading ${module}"
  95                         rmmod ${module} &> /dev/null
  96                         eend $?
  97                 done

But the i2c-core module isn't unloaded. Will fix that first thing in the morning.
Comment 2 Christian Heim (RETIRED) gentoo-dev 2006-07-16 02:23:08 UTC
Should be fixed in CVS now.

 105                 if [[ -e /sys/bus/i2c || /sys/i2c ]] ; then
 106                         ebegin "  Unloading i2c-core"
 107                         rmmod i2c-core &> /dev/null
 108                         eend $?
 109                 fi
Comment 3 Christian Heim (RETIRED) gentoo-dev 2006-07-16 02:25:16 UTC
Meh, again I should really mark it FIXED if its fixed in CVS.