home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
etc
/
sysconfig
/
hardware
/
scripts
/
functions.pcmcia_socket
< prev
Wrap
Text File
|
2006-11-29
|
1KB
|
45 lines
if [ -r /dev/shm/nopcmcia ] ; then
mesg "Won't initialize pcmcia_socket due to boot parameter" \
"`cat /dev/shm/nopcmcia`"
exit 0
fi
test -r /etc/sysconfig/pcmcia && . /etc/sysconfig/pcmcia
MODALIAS=pcmcia
# Overwrite this function to avoid useless getcfg call.
# This may be removed if we restrict getcfg calls or remove them completely.
get_config_getcfg() {
get_config_fast
}
get_pcmcia_socket_information() {
if [ -z "$SOCKET_NO" ] ; then
SOCKET_NO=${HWD_DEVICEPATH##*pcmcia_socket}
fi
}
post_init_pcmcia_socket() {
info_mesg "Assinging ressources to socket '$SOCKET_NO'"
pcmcia-socket-startup $SOCKET_NO
DONE_FILE=$HWD_DEVICEPATH/available_resources_setup_done
if [ -f $DONE_FILE ]; then
if [ -w $DONE_FILE ]; then
echo -n "42" > $DONE_FILE
fi;
fi;
if [ "$PCMCIA_COLDPLUG_REINSERT" == yes ] ; then
sleep 1
info_mesg "ejecting card in socket '$SOCKET_NO'"
echo 42 > $HWD_DEVICEPATH/card_eject
info_mesg "inserting card in socket '$SOCKET_NO'"
echo 42 > $HWD_DEVICEPATH/card_insert
fi
}
show_pcmcia_socket_information() {
info_mesg "SOCKET_NO=$SOCKET_NO"
}