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

Bug 60291

Summary: Pcmcia card manager won'd remove the module when service is stopped
Product: Gentoo Infrastructure Reporter: dimfox <dimfox>
Component: GitAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 68964    

Description dimfox 2004-08-13 21:12:11 UTC
The pcmcia always try to 'modprobe i82365' first, when it fails it will modprobe 'yenta_socket'. 
The problem is, when you stop the service, it will only try to unload 'i82365', not the 'yenta_socket'

the problem can be solved by adding an extra line into "/etc/init.d/pcmcia"
/sbin/rmmod $PCIC_ALT> /dev/null

So it's 'stop' procedure should look like this:
stop() {
        local code

        if [ -w ${SC} ] ; then rm -f ${SC} ; fi

        ebegin "Stopping pcmcia"
        start-stop-daemon --stop --quiet --pidfile /var/run/cardmgr.pid --retry 5
        code=$?

        if [ -n `fgrep "ds " /proc/modules | head -n1 | cut -c1` ]; then
                echo "removing modules"
                /sbin/rmmod ds 2> /dev/null
                /sbin/rmmod $PCIC 2> /dev/null
                /sbin/rmmod $PCIC_ALT> /dev/null #<---added line
                /sbin/rmmod pcmcia_core 2> /dev/null
        fi

        eend $code
}




Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Henrik Brix Andersen 2005-04-25 05:13:17 UTC
Fixed in sys-apps/pcmcia-cs-3.2.8. Thank you for reporting this.