[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    Re: PLACE directive subsumed?
From:       "Kay Sievers" <kay.sievers () vrfy ! org>
Date:       2007-12-03 18:28:34
Message-ID: 3ae72650712031028p4c18dbe4k2d34c991cb81f5a7 () mail ! gmail ! com
[Download RAW message or body]

On Nov 30, 2007 9:30 PM, Jeremy McBane <modul8r@incognito.org> wrote:
> I need to make udev rules for multiple, identical multi-port
> USB-to-serial converters so the converter that's attached to a certain
> USB port will always be assigned the same device nodes (or symlinks in
> my example below).
>
> In the past I was able to use the PLACE directive to do this.  For
> example (for a 4-port converter):
>
>      BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0201"
> SYSFS{serial}="*-0" PLACE="1" NAME="%k" SYMLINK="ttyEDGE4_A_0_%e"
>      BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0201"
> SYSFS{serial}="*-1" PLACE="1" NAME="%k" SYMLINK="ttyEDGE4_A_1_%e"
>      BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0201"
> SYSFS{serial}="*-0" PLACE="2" NAME="%k" SYMLINK="ttyEDGE4_B_0_%e"
>      BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0201"
> SYSFS{serial}="*-1" PLACE="2" NAME="%k" SYMLINK="ttyEDGE4_B_1_%e"
>
>         ln -s /dev/ttyEDGE4_A_0_  /dev/ttyA1
>         ln -s /dev/ttyEDGE4_A_0_1 /dev/ttyA2
>         ln -s /dev/ttyEDGE4_A_1_  /dev/ttyA3
>         ln -s /dev/ttyEDGE4_A_1_1 /dev/ttyA4
>         ln -s /dev/ttyEDGE4_B_0_  /dev/ttyB1
>         ln -s /dev/ttyEDGE4_B_0_1 /dev/ttyB2
>         ln -s /dev/ttyEDGE4_B_1_  /dev/ttyB3
>         ln -s /dev/ttyEDGE4_B_1_1 /dev/ttyB4
>
> The problem I'm running into is that PLACE doesn't seem to be supported
> in newer kernels (newer versions of udev?), i.e. Fedora 7.  How would I
> achieve this on a Fedora 7 box?

Try KERNELS=="*1" (or for udev older than 098, use ID==).

Also drop the useless NAME="%k", use '+=' for SYMLINK or it will
drop previous symlinks, use '==' for all matches, and use a ',' to
separate the matches in the rules from each other.

Kay

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic