From owner-freebsd-stable@FreeBSD.ORG Mon Mar 2 18:49:00 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 581C91065675 for ; Mon, 2 Mar 2009 18:49:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id EDF258FC1A for ; Mon, 2 Mar 2009 18:48:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LeDCD-0005KP-SW; Mon, 02 Mar 2009 20:48:58 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n22Ims8n008762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Mar 2009 20:48:54 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n22ImsaJ043287; Mon, 2 Mar 2009 20:48:54 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n22Imr1J043286; Mon, 2 Mar 2009 20:48:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Mar 2009 20:48:53 +0200 From: Kostik Belousov To: Roland Smith Message-ID: <20090302184853.GE41617@deviant.kiev.zoral.com.ua> References: <20090228143453.GX41617@deviant.kiev.zoral.com.ua> <49ABDDE2.6090402@icyb.net.ua> <20090302182839.GA89715@slackbox.xs4all.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VRy2DAmnTueP9XfJ" Content-Disposition: inline In-Reply-To: <20090302182839.GA89715@slackbox.xs4all.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LeDCD-0005KP-SW 038bba5b507c39e7c809314aa8f37d5d X-Terabit: YES Cc: 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 18:49:01 -0000 --VRy2DAmnTueP9XfJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 02, 2009 at 07:28:39PM +0100, Roland Smith wrote: > On Mon, Mar 02, 2009 at 03:23:46PM +0200, Andriy Gapon wrote: > > 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 de= vice > > >> 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 devi= ce > > >> 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! > > >=20 > > > 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. > >=20 > > 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"; > > }; >=20 > This system is missing from the devd.conf manual page, nor is DEVFS > mentioned in /usr/share/examples/etc/devd.conf. Is it documented > somewhere else? No, it is not documented anywhere. Feel free to send me the documentation patch. --VRy2DAmnTueP9XfJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmsKhQACgkQC3+MBN1Mb4iLzwCg5eUTzslaLHfpOW9I8pij+HDN bDYAnRZlDQH9FfV+1vtknkyz9uljeMcE =EQab -----END PGP SIGNATURE----- --VRy2DAmnTueP9XfJ--