linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how does udev rename an interface?
@ 2004-12-26 11:28 martin f krafft
  2004-12-26 12:33 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: martin f krafft @ 2004-12-26 11:28 UTC (permalink / raw)
  To: linux-hotplug

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

udev has the ability to rename network interfaces. At least on my
system, udevsend is called from /etc/hotplug.d/default. A network
device usually triggers two hotplug events, the first for the
device, and the second for the network interface. Therefore, udev
runs twice, but network interface renaming only makes sense during
the second invocation, since it only applies to network interfaces.

I have two questions about how udev handles this:

  - /etc/hotplug.d/net/*.hotplug are run before udevsend is called
    from /etc/hotplug.d/default. Thus, if a tool such as ifplugd
    already configures the network interface with
    /etc/hotplug.d/net, udev effectively cannot change the
    interface name because the interface is in use.

  - even if udev changes the interface name, how does it communicate
    the new name to net.agent and all the other hook scripts? The
    interface name is stored in $INTERFACE in the environment of the
    hotplug process, and udev cannot change that environment (or can
    it?).

How does udev deal with this?

Thanks,

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus@madduck.net
 
if it's there, and you can see it, it's real.
if it's not there, and you can see it, it's virtual.
if it's there, and you can't see it, it's transparent.
if it's not there, and you can't see it, you erased it.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-26 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-26 11:28 how does udev rename an interface? martin f krafft
2004-12-26 12:33 ` Kay Sievers
2004-12-26 13:30 ` martin f krafft
2004-12-26 13:57 ` 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).