From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 11 20:25:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26E7316A4DA for ; Fri, 11 Aug 2006 20:25:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 471F443D62 for ; Fri, 11 Aug 2006 20:25:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k7BKO4kQ014002; Fri, 11 Aug 2006 14:24:04 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 11 Aug 2006 14:24:11 -0600 (MDT) Message-Id: <20060811.142411.723206251.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <867j1fyt2g.fsf@xps.des.no> References: <00d301c6bd73$99ef3fc0$2bba90c1@Altair> <867j1fyt2g.fsf@xps.des.no> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 11 Aug 2006 14:24:05 -0600 (MDT) Cc: jchoque@tlmat.unican.es, freebsd-hackers@freebsd.org Subject: Re: Attach/detach devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2006 20:25:20 -0000 In message: <867j1fyt2g.fsf@xps.des.no> des@des.no (Dag-Erling Sm=F8rgrav) writes: : "Johnny Choque" 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