misc/166321: devd rule is not processed
Gary Palmer
gpalmer at freebsd.org
Thu Mar 22 18:30:06 UTC 2012
The following reply was made to PR misc/166321; it has been noted by GNATS.
From: Gary Palmer <gpalmer at freebsd.org>
To: Stefan BALU <balustefan at gmail.com>
Cc: freebsd-gnats-submit at 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 at 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 at 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
More information about the freebsd-bugs
mailing list