Re: Creating /dev links to dynamic devices

From: Justin Hibbits <jrh29_at_alumni.cwru.edu>
Date: Sat, 24 Oct 2009 22:07:02 -0400
On Sat, Oct 24, 2009 at 10:00 PM, Warren Block <wblock_at_wonkity.com> wrote:

> devfs.conf allows creating static device links:
>
> link    acd0    cdrom
>
> This only runs on devfs startup, so it's useless for creating a link to a
> dynamic device.
>
> The specific example is for scanners.  My scanner is ugen2.3, but only as
> long as it is plugged into the same USB hub/port each time.  I can manually
> create a uscanner0 link in /dev with devd.conf:
>
> attach 20 {
>        device-name "ugen[0-9]+";
>        match "vendor" "0x04b8";
>        match "product" "0x010a";
>        action "/bin/ln -sf /dev/$device-name /dev/uscanner0; /sbin/devfs
> rule applyset";
> };
>
> Using /dev/uscanner0 then works in place of ugen2.3.
>
> Now the second part of the example: I want devd to recognize the attach or
> creation of uscanner0.  But it's not a true devfs device; devd doesn't see
> an attach event, or a notify CDEV/CREATE event.
>
> Is there a method to create a true devfs link to a dynamic device?
>
> -Warren Block * Rapid City, South Dakota USA
>

Check devfs.rules(5)
Received on Sun Oct 25 2009 - 00:39:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC