--- pcmcia.rc6 Thu Aug 22 02:04:01 2002 +++ pcmcia Thu Aug 22 02:04:44 2002 @@ -32,8 +32,11 @@ if [ -d /var/lib/pcmcia ] ; then rm -rf /var/lib/pcmcia fi - + + # if no ds modules are loaded, then we do it for them if [ -z "`fgrep ds /proc/modules`" ] ; then + modprobe ${PCIC} + modprobe ds modules_loaded="0" else modules_loaded="1" @@ -54,6 +57,12 @@ ebegin "Stopping pcmcia" start-stop-daemon --stop --quiet --pidfile /var/run/cardmgr.pid --retry 5 + # remove these modules if they're not used + if [ -n "`fgrep ds /proc/modules`" ] ; then + modprobe -r ds + modprobe -r ${PCIC} + fi + eend $? }