--- rc.pcmcia.orig Wed May 6 16:44:26 1998 +++ rc.pcmcia Wed May 6 17:10:03 1998 @@ -24,10 +24,16 @@ . /etc/sysconfig/pcmcia if [ "$PCMCIA" != "yes" ] ; then exit 0 ; fi else - # Should be either i82365 or tcic - PCIC=i82365 - # Put socket driver timing parameters here - PCIC_OPTS= + # Should be either i82365 or tcic. The "probe" option is a Slackware + # addition which tries loading both modules; usually one or the other + # will load if a PCMCIA subsystem is present. Of course, the correct + # thing to do is to pick i82365 or tcic manually. +# PCIC=i82365 +# PCIC=tcic + PCIC=probe + # Put socket driver timing parameters here. + # "poll_interval=100" will save an IRQ. + PCIC_OPTS="poll_interval=100" # Put pcmcia_core options here CORE_OPTS= # Put cardmgr options here @@ -56,9 +62,17 @@ if [ $? -ne 0 ] ; then PC=/lib/modules/`uname -r`/pcmcia if [ -d $PC ] ; then - echo -n " modules" +# echo -n " modules" /sbin/insmod $PC/pcmcia_core.o $CORE_OPTS - /sbin/insmod $PC/$PCIC.o $PCIC_OPTS + if [ "$PCIC" = "probe" ]; then # attempt to load both + echo " " + /sbin/insmod $PC/i82365.o $PCIC_OPTS 2> /dev/null + if [ ! $? = 0 ]; then # try tcic + /sbin/insmod $PC/tcic.o $PCIC_OPTS 2> /dev/null + fi + else # PCIC has been selected manually + /sbin/insmod $PC/$PCIC.o $PCIC_OPTS + fi /sbin/insmod $PC/ds.o else echo " module directory $PC not found." @@ -72,7 +86,7 @@ if [ -r /var/run/stab ] ; then cat /var/run/stab | cleanup fi - echo " cardmgr." +# echo " cardmgr." /sbin/cardmgr $CARDMGR_OPTS fi if [ -d /var/lock/subsys ] ; then @@ -90,7 +104,12 @@ if fgrep -q "ds " /proc/modules ; then echo -n " modules" /sbin/rmmod ds - /sbin/rmmod $PCIC + if [ "$PCIC" = "probe" ]; then + /sbin/rmmod i82365 + /sbin/rmmod tcic + else + /sbin/rmmod $PCIC + fi /sbin/rmmod pcmcia_core fi echo "."