public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Marc Joliet <marcec@gmx.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] udev-197 and /etc/udev/rules.d/
Date: Tue, 22 Jan 2013 18:51:59 +0100	[thread overview]
Message-ID: <20130122185159.1cbd90a0@marcec.hunte.us> (raw)
In-Reply-To: <20130122142357.38ae57bb@digimed.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]

Am Tue, 22 Jan 2013 14:23:57 +0000
schrieb Neil Bothwick <neil@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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-01-22 17:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  3:56 [gentoo-user] udev-197 and /etc/udev/rules.d/ »Q«
2013-01-22  6:07 ` [gentoo-user] " Hartmut Figge
2013-01-22  8:55 ` [gentoo-user] " Marc Joliet
2013-01-22 14:23 ` Neil Bothwick
2013-01-22 17:51   ` Marc Joliet [this message]
2013-01-23  2:29     ` [gentoo-user] " »Q«

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130122185159.1cbd90a0@marcec.hunte.us \
    --to=marcec@gmx.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox