Date: Thu, 22 Mar 2012 18:30:05 GMT From: Gary Palmer <gpalmer@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/166321: devd rule is not processed Message-ID: <201203221830.q2MIU5QL063179@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR misc/166321; it has been noted by GNATS.
From: Gary Palmer <gpalmer@freebsd.org>
To: Stefan BALU <balustefan@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/166321: devd rule is not processed
Date: Thu, 22 Mar 2012 14:24:08 -0400
On Thu, Mar 22, 2012 at 06:01:48PM +0000, Stefan BALU wrote:
> I have a UPS box which works like a charm with nut (netwok-ups-tools). In order for the nut driver to properly work, it needs the `/dev/ugen*` file to be owned by `uucp`.
>
> In order to do this, i have a `devd(8)` configuration file in `/usr/local/etc/devd/` entitled `nut.conf`.
>
> [root@fw ~]# cat /usr/local/etc/devd/nut.conf
> attach 100 {
> match "device-name" "ugen[0-9]+";
> match "vendor" "0x0665";
> match "product" "0x5161";
> action "logger chown uucp /dev/$device-name*";
> };
>
> [root@fw ~]# usbconfig dump_device_desc
> ..
> ugen1.3: <USB to Serial Cypress Semiconductor> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
>
The reason is in the above information. You are matching against
"ugen[0-9]+" but the device is "ugen1.3". Note that [0-9]+ means one or
more characters from the set of 0 through 9. No ".". Try fixing the
ugen regular expression to allow for the ".". e.g.
"ugen[0-9.]+"
or
"ugen[0-9]+.[0-9]+"
Gary
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203221830.q2MIU5QL063179>
