Date: Mon, 2 Mar 2009 20:48:53 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Roland Smith <rsmith@xs4all.nl> Cc: freebsd-stable@freebsd.org Subject: Re: devd question Message-ID: <20090302184853.GE41617@deviant.kiev.zoral.com.ua> In-Reply-To: <20090302182839.GA89715@slackbox.xs4all.nl> References: <y9lljrq1z89.fsf@deinprogramm.de> <20090228143453.GX41617@deviant.kiev.zoral.com.ua> <49ABDDE2.6090402@icyb.net.ua> <20090302182839.GA89715@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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 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";
> > };
>
> 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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
iEYEARECAAYFAkmsKhQACgkQC3+MBN1Mb4iLzwCg5eUTzslaLHfpOW9I8pij+HDN
bDYAnRZlDQH9FfV+1vtknkyz9uljeMcE
=EQab
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090302184853.GE41617>
