[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTilRdnjShlB2JA1TjxMklTjw4ASl3BhwUWtKRdMW@mail.gmail.com>
Date: Fri, 9 Jul 2010 09:57:14 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: Florian Weimer <fweimer@....de>
Cc: "Loke, Chetan" <Chetan.Loke@...scout.com>,
Matt Domsch <Matt_Domsch@...l.com>,
Michael Di Domenico <mdidomenico4@...il.com>,
linux-net@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: nic enumeration
On Fri, Jul 9, 2010 at 09:18, Florian Weimer <fweimer@....de> wrote:
>> Ok, but can we achieve the renaming w/o a reboot?
>
> "udev-trigger" or "udevadm trigger" works for renaming network
> interfaces. The kernel has some restrictions on renaming interfaces
> which are in use, so this might not work in your case.
On older systems it would be:
udevtrigger
on newer systems it would be:
udevadm trigger
On recent systems you need to add:
udevadm trigger --action=add
otherwise 'change' events will be triggered, which don't rename any
netif. The default 'add' events caused too many problems with tools
with not well integrated tools.
And you should always limit the trigger to the subsystem you want to work with:
udevadm trigger --action=add --subsystem-match=net
otherwise you run events for all devices on the system, which may
cause completely unrelated trouble.
Anyway, it's not recommended to do anything like this. On many distros
it will cause trouble with the network scripts/services, which are run
again for already active interfaces. Using the udevadm trigger
'hammer' on the running system may lead to all sorts of problems. This
tool is usually only used at coldplug time during bootup.
Also, busy interfaces which might be included in the rename attempt
will cause ethX_rename failures if names need to be swapped.
In general, there is no safe way, or a tool to do this. You have to
know very well what you are doing. It's pretty common, that you
disconnect yourself from a remote box if you try anything like this.
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists