Automatically start drivers when PC Cards are inserted
|You must be root to run this utility.|
pccard-launch [-nv] 'type,command'...
pccard-launch '0x600,io-pkt-v4 -dne2000 ioport=0x$IOPORT,\ irq=$IRQ'
You can specify multiple type/command pairs on the command line by separating them with whitespace. If the command specified contains whitespace, the command must be enclosed in quotes (as shown).
The pccard-launch utility automatically starts drivers and sets environment variables describing the ports and IRQs used by a card, thus permitting a non-PC Card-aware driver to be started automatically when a card is inserted, and stopped when removed.
The environment variables may be named in the command lines for the drivers to be run, thus allowing the port and IRQ information to be passed on the command line to the drivers, most of which aren't aware of the environment variables set by pccard-launch.
This utility both starts driver when cards are plugged in and stops them via a SIGTERM signal when cards are removed.
When a card is plugged in, pccard-launch checks the card type against the list of card types/driver commands supplied to it on its command line. If it doesn't know about the card type, it does nothing. If it has been provided with a command for the card type, it does the following:
When the card is removed, pccard-launch unlocks the card and signals the previously spawned process with SIGTERM.
You can determine the card type by using the pin command. A pin con command displays configuration information for the PC Card. Look at the config line, which should look something like:
config = 0xNN, 0xTTTT..."
where NN is the configuration number and TTTT is the type of the card. For example, a modem card has a type of 0x200. This is the type that you must use on the command line for pccard-launch.
Automatically start the ne2000 driver with the appropriate I/O port and IRQ settings, for PC Card type 0x600:
pccard-launch '0x600,io-pkt-v6-hc -dne2000 ioport=0x$IOPORT,irq=$IRQ'
The environment variables set by pccard-launch are: