Am Tue, 22 Jan 2013 14:23:57 +0000
schrieb Neil Bothwick <n...@digimed.co.uk>:

> On Mon, 21 Jan 2013 21:56:00 -0600, »Q« wrote:
> 
> > Here's /etc/udev/rules.d/12-opticaldrive.rules, just one line:
> > 
> > KERNEL=="sr0", SUBSYSTEM=="block", NAME="opticaldrive", SYMLINK+="%k",
> > SYMLINK+="cdrom", SYMLINK+="cdrw", SYMLINK+="dvd", SYMLINK+="dvdrom",
> > SYMLINK+="dvdrw"
> 
> ISTR a change in udev that prevented renaming devices. Put it all as
> symlinks instead of renaming and trying to symlink back to %k. It seems
> that all the replies with working examples do it this way too.

I was interested enough to look this up. I looked through the git log of
my /etc/udev/rules.d/ and found that in early October 2012 I committed a change
to that effect, so something did change at some point.

However, I can't find any reference to that in the udev changelog. In fact, it
actually looks like it's a kernel change and that udev is really just "obeying"
the kernel [0] [1].

But I did find out that this is in fact documented in the udev(7) man page:

   NAME
     The name to use for a network interface. The name of a device node cannot
     be changed by udev, only additional symlinks can be created.

So currently you can only change network interface names, and nothing else.

[0] I haven't searched extensively, but found a related Email from Greg K-H
(search for "rename") that points out that device node renaming has
problematic/fragile behaviour:
http://lkml.indiana.edu/hypermail/linux/kernel/1010.1/00427.html.

[1] https://www.kernel.org/doc/htmldocs/device-drivers/API-device-rename.html
(documentation generated from linux-3.0-rc7). Relevant quote: "Device nodes are
not renamed at all, there isn't even support for that in the kernel now."

HTH
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

Attachment: signature.asc
Description: PGP signature

Reply via email to