Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] renaming a network dev w/udevadm from command line?
В Sun, 02 Jun 2013 19:04:00 -0700
Linda Walsh <suse@xxxxxxxxx> пишет:

How does one rename an ethernet interface from the command
line using udevadm?

Does "ip link set dev ethX name XXX" work? Interface must be down at
this point.

I've looked at the man page on that, and it's about as clear
as lead paint.

On reboot the other day, my persistent netdev rules didn't run for some
likely some new 'gotcha' in disabling old boot procedures.

Rather than doing what I did which was to make the modules
in question dynamically loadable, and bring up the system
by hand and load the modules in the order I wanted them loaded, I'
figured it would be easier to ask on here how one does this?

If they are already installed, do I need to do a udevadm control?

Or do I need a udevadm action to emulate what is going on
in the 70-persistent-net.rules?

Yes. You can just do "echo add > /sys/.../event" for your device. Or
use "udevadm trigger" which effectively does the same.

These all look like 'add', so aren't there old names that need to
be moved out of the way?


or does adding these at "new name"
automatically deleted them at "old name"?



SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:26:b9:2c:a4:f1", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth3"

Current upstream udev does not attempt to work around "need to be
moved out of the way" so this will not work reliably. Use name space
that does not clash with internal kernel one, like "netXXX". That is
guaranteed to work.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups