* PLACE directive subsumed?
@ 2007-11-30 20:30 Jeremy McBane
0 siblings, 0 replies; 2+ messages in thread
From: Jeremy McBane @ 2007-11-30 20:30 UTC (permalink / raw)
To: linux-hotplug
Hello,
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?
Thanks in advance,
-Jeremy
-------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: PLACE directive subsumed?
@ 2007-12-03 18:28 Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2007-12-03 18:28 UTC (permalink / raw)
To: linux-hotplug
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-03 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-30 20:30 PLACE directive subsumed? Jeremy McBane
-- strict thread matches above, loose matches on Subject: below --
2007-12-03 18:28 Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).