From owner-freebsd-stable@FreeBSD.ORG Mon Mar 2 14:11:17 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABB9A1065675 for ; Mon, 2 Mar 2009 14:11:17 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from h615406.serverkompetenz.net (h615406.serverkompetenz.net [81.169.143.132]) by mx1.freebsd.org (Postfix) with ESMTP id 6501E8FC1D for ; Mon, 2 Mar 2009 14:11:17 +0000 (UTC) (envelope-from sperber@deinprogramm.de) Received: from h615406.serverkompetenz.net (localhost [127.0.0.1]) by h615406.serverkompetenz.net (Postfix) with ESMTP id 5E9B1170BD; Mon, 2 Mar 2009 13:51:28 +0000 (UTC) Received: from eta.local (p5B206619.dip.t-dialin.net [91.32.102.25]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by h615406.serverkompetenz.net (Postfix) with ESMTP id 045D6170BB; Mon, 2 Mar 2009 13:51:28 +0000 (UTC) Received: by eta.local (Postfix, from userid 2246) id 38D042E7CED; Mon, 2 Mar 2009 14:51:27 +0100 (CET) From: Michael Sperber To: Andriy Gapon References: <20090228143453.GX41617@deviant.kiev.zoral.com.ua> <49ABDDE2.6090402@icyb.net.ua> Date: Mon, 02 Mar 2009 14:51:27 +0100 In-Reply-To: <49ABDDE2.6090402@icyb.net.ua> (Andriy Gapon's message of "Mon, 02 Mar 2009 15:23:46 +0200") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.5-b28 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: Kostik Belousov , freebsd-stable@freebsd.org Subject: Re: devd question X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 14:11:17 -0000 Andriy Gapon writes: > on 28/02/2009 16:34 Kostik Belousov said the following: >> On Sat, Feb 28, 2009 at 02:13:10PM +0100, Michael Sperber wrote: >>> I'm trying to make devd run an stty command whenever a USB serial device >>> is attached. Unfortunately, $device-name is ucom[0-9] and the device >>> names are /dev/cuaU[0-9] - how do I get the correct name in the device >>> action? I haven't found a way to extract the number by itself, so I'm >>> stuck with specifying a separate rule for each number, like so: >>> >>> attach 100 { >>> device-name "ucom0"; >>> action "stty -f /dev/cuaU0.init raw"; >>> }; >>> >>> Help would be much appreciated! >> >> There are some other notifications that are send through devctl when >> cdev is created. They have system set to DEVFS, subsystem to CDEV, >> and type CREATE. The data is the /dev node name. I am not sure how >> to assign the action in the devd. > > A tested example: > notify 1000 { > match "system" "DEVFS"; > match "subsystem" "CDEV"; > match "cdev" "^da[0-9]+$"; > action "echo 't120o3l32 b>c+f+16' > /dev/speaker"; > }; I'm probably not understanding this---but how is the device number transferred from the "cdev" match to the "action" line? -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla