PCMCIA init script for 2.6.12
Jar
jar at pcuf.fi
Wed Jul 6 09:05:58 EDT 2005
>
> Please do "cardctl eject" first, then
> "/etc/init.d/pcmcia stop"
>
There is already 'cardctl eject' in my script. Now is looks like this (adding -9 to
'kill $PID' seems to be some effect:
stop)
echo -n $"Shutting down PCMCIA services: "
/sbin/cardctl eject && sleep 2
if [ -s /var/run/cardmgr.pid ] ; then
PID=`cat /var/run/cardmgr.pid`
kill -9 $PID
# Give cardmgr a few seconds to handle the signal
for N in 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 ; do
kill -0 $PID 2>/dev/null || break
sleep 2
done
fi
killall -q "CardBus Watcher"
if grep -q "^pcmcia " /proc/modules ; then
/sbin/modprobe -r pcmcia
/sbin/modprobe -r $PCIC 2>/dev/null || \
/sbin/modprobe -r yenta_socket 2>/dev/null
/sbin/modprobe -r rsrc_nonstatic
/sbin/modprobe -r pcmcia_core
fi
echo $"done."
rm -f /var/lock/subsys/pcmcia
EXITCODE=0
;;
..but when I run 'pcmcia stop, pcmcia start' about four times it works ok, but in
fifth time it looses the "sync." or something and starts to complain that modules
are in use. Cant't unload them, only reboot helps.
--
Best Regards, Jar
More information about the linux-pcmcia
mailing list