Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2006 14:24:11 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        des@des.no
Cc:        jchoque@tlmat.unican.es, freebsd-hackers@freebsd.org
Subject:   Re: Attach/detach devices
Message-ID:  <20060811.142411.723206251.imp@bsdimp.com>
In-Reply-To: <867j1fyt2g.fsf@xps.des.no>
References:  <00d301c6bd73$99ef3fc0$2bba90c1@Altair> <867j1fyt2g.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <867j1fyt2g.fsf@xps.des.no>
            des@des.no (Dag-Erling Sm=F8rgrav) writes:
: "Johnny Choque" <jchoque@tlmat.unican.es> writes:
: > I sent an email to this mailing list some day ago (August 2) explai=
ning 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 sect=
ion 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/1279=
90.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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060811.142411.723206251.imp>