Subject: Re: PCMCIA Daemon
To: Jared D. McNeill <>
From: Lennart Augustsson <>
List: current-users
Date: 07/21/2000 22:07:27
"Jared D. McNeill" wrote:

> Hi, I'm writing a daemon that executes a specified script when a PCMCIA
> card is inserted. Unfortunately, the way I'm doing it now, it only works
> for ethernet devices and (probably) takes more resources than it
> should. What I'm doing is running through an infinite loop, each time
> walking through a struct ifaddrs. If the device specified on the command
> line is in the list, and the device is down, the program executes
> /etc/pcmcia/config/<device name>. Is there a way I could have the program
> wait and listen for any card to be inserted, rather than constantly
> looping and checking? That way not only would the program take less
> resources (IMO), but it could also be used for any PCMCIA device.

You could make something similar to what I did for USB, and introduce a
device that reports events, like hardware attach and detach.


        -- Lennart