Re: Attach/detach devices

[ Available lists | Index of freebsd-hackers | Month of Aug 2006 | Week of 11 Aug 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
M. Warner Losh <imp@bsdimp.com>
Date
11 Aug 2006 20:25:20
Subject
Re: Attach/detach devices
Message-ID
20060811.142411.723206251.imp@bsdimp.com


[ Hide this part ]
In message: <867j1fyt2g.fsf@xps.des.no>
des@des.no (Dag-Erling Smrgrav) writes:
: "Johnny Choque" <jchoque@tlmat.unican.es> writes:
: > I sent an email to this mailing list some day ago (August 2) explaining a
: > problem that I had with devd.conf. Using devd -dD, I detected that removing
: > the wireless pc card the rules that are included in the detach section do
: > not happen to run, but anybody answered my question :-(
:
: That's because you didn't ask here; you asked on freebsd-questions,
: which nobody capable of answering your question ever reads.
:
: http://lists.freebsd.org/pipermail/freebsd-questions/2006-August/127990.html

The problem is chicken and egg. I see how you are doing this now...

detach 0 {
media-type "802.11";
action "/etc/pccard_ether $device-name stop"; };

The problem is that by the time the 'detach' comes, the device is no
longer in the system. It is long gone. So when we do the comparison
against media type, we have no clue what kind of media it is, and the
test fails.

For now, add a rule matching device name wi.

Warner


Elapsed time: 0.131 seconds