From owner-freebsd-questions@FreeBSD.ORG Wed Aug 2 08:48:24 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BA3816A4DE for ; Wed, 2 Aug 2006 08:48:24 +0000 (UTC) (envelope-from jchoque@tlmat.unican.es) Received: from luna.tlmat.unican.es (luna.tlmat.unican.es [193.144.186.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDF5443D6E for ; Wed, 2 Aug 2006 08:48:22 +0000 (GMT) (envelope-from jchoque@tlmat.unican.es) Received: from Altair (altair.tlmat.unican.es [193.144.186.43]) by luna.tlmat.unican.es (8.12.11/8.12.11) with ESMTP id k728Mtaj006570 for ; Wed, 2 Aug 2006 10:22:55 +0200 From: "Johnny Choque" To: Date: Wed, 2 Aug 2006 10:48:20 +0200 Message-ID: <008001c6b610$67f836d0$2bba90c1@Altair> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: Aca2EGflWl5b5P/eRGCZhn84tnzOWg== Subject: devd problem? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 08:48:24 -0000 Hi all, I has been testing the execution of some commands after inserting and removing a wireless pc card, using the rules of devd.conf and I've noticed quite a strange behavior with devd. I have used it in debug mode, thus running 'devd -dD', in order to see the rules that will be happening. Specifically, the rules in devd.conf that I want to monitor are the following ones: detach 0 { media-type "802.11"; action "/etc/pccard_ether $device-name stop"; }; attach 0 { media-type "802.11"; action "/etc/pccard_ether $device-name start"; }; After the Wireless pc card is inserted, the 'devd -dD' command shows the following messages: Processing event '+wi0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies" cisproduct="WaveLAN/IEEE" function_type=6 at function=0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies" cisproduct="WaveLAN/IEEE" function_type=6 on pccard0' Pushing table setting device-name=wi0 setting manufacturer=0x0156 setting product=0x0002 setting cisvendor=Lucent Technologies setting cisproduct=WaveLAN/IEEE setting function_type=6 Processing attach event Testing device-name=wi0 against ^ed50 Testing device-name=wi0 against ^ubt[0-9]+ Testing device-name=wi0 against ^ukbd0 Testing device-name=wi0 against ^ums[0-9]+ Testing media type of wi0 against 0x20 wi0 has media type 0x80 Testing media type of wi0 against 0x80 wi0 has media type 0x80 Executing '/etc/pccard_ether wi0 start' Popping table As you can see, the command pccard_ether, which is included in the attach section is successfully run but, after removing the wireless pc card, the rules that are included in the detach section do not happen to run, as showed in the following messages: Processing event '-wi0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies" cisproduct="WaveLAN/IEEE" function_type=6 at function=0 manufacturer=0x0156 product=0x0002 cisvendor="Lucent Technologies" cisproduct="WaveLAN/IEEE" function_type=6 on pccard0' Pushing table setting device-name=wi0 setting manufacturer=0x0156 setting product=0x0002 setting cisvendor=Lucent Technologies setting cisproduct=WaveLAN/IEEE setting function_type=6 Processing detach event Testing device-name=wi0 against ^ed50 Testing device-name=wi0 against ^ubt[0-9]+ Testing device-name=wi0 against ^ukbd0 Testing media type of wi0 against 0x20 Testing media type of wi0 against 0x80 Popping table I was expecting a similar behaviour of devd as the one I saw when I inserted the pc card, but the message: Executing '/etc/pccard_ether wi0 stop' doesn't appear and for this reason I think that the rule of the detach section does not run. Does anybody know which may be the problem? What I need to do is executing a particular application upon the removal of the pc card, do you know how can I do that? Cheers, Johnny