From owner-freebsd-stable@FreeBSD.ORG Mon Mar 2 18:42:03 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 2171C10656E3 for ; Mon, 2 Mar 2009 18:42:03 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr3.xs4all.nl (smtp-vbr3.xs4all.nl [194.109.24.23]) by mx1.freebsd.org (Postfix) with ESMTP id A89FA8FC1F for ; Mon, 2 Mar 2009 18:42:02 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr3.xs4all.nl (8.13.8/8.13.8) with ESMTP id n22ISd8K023402 for ; Mon, 2 Mar 2009 19:28:40 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id A6684BA8C; Mon, 2 Mar 2009 19:28:39 +0100 (CET) Date: Mon, 2 Mar 2009 19:28:39 +0100 From: Roland Smith To: freebsd-stable@freebsd.org Message-ID: <20090302182839.GA89715@slackbox.xs4all.nl> References: <20090228143453.GX41617@deviant.kiev.zoral.com.ua> <49ABDDE2.6090402@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <49ABDDE2.6090402@icyb.net.ua> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner 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:42:03 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 devi= ce > >> 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! > >=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"; > }; 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? =20 Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --J2SCkAp4GZ/dPZZf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkmsJVcACgkQEnfvsMMhpyUn0gCfacV40ZT6CQlVU5FqTAeTgdW/ N6wAn0Wecz2nKWiTme2hqRX870gfm/Mp =/GbZ -----END PGP SIGNATURE----- --J2SCkAp4GZ/dPZZf--