Re: How can I prevent udevd from renaming eth0 to em1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Digimer wrote:
On 10/17/2012 09:18 PM, Digimer wrote:
On 10/17/2012 06:24 PM, JD wrote:
Briefly....
$ ifconfig -a
em1       Link encap:Ethernet  HWaddr xx:xx:...etc

lo        Link encap:Local Loopback

virbr0    Link encap:Ethernet  HWaddr xx:xx:...etc

virbr0-nic Link encap:Ethernet  HWaddr xx:xx:...etc

wlan0     Link encap:Ethernet  HWaddr xx:xx:...etc

Ah, I see. On my systems, I get:

===
em1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
         ether f0:de:f1:fc:65:b3  txqueuelen 1000  (Ethernet)
===

So the script says "grab any non-space character up to the colon (foo:).
Your now showing a colon, so it fails to match.

Try replacing:

===
	if ($line =~ /^(\S+):/)
===

With:


===
	if ($line =~ /^(\S+)/)
===

Strike that, I see that you are also showing the HWADDR on the same
line, so the whole regex this is going to miss your output.

Skip the script; The main thing is to take the 'em1 ... HWadd:
aa:bb:cc:dd:ee:ff' and put it in 70-persistent-net.rules as (one line);

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0"

Then in you 'ifcfg-eth0' file, set 'DEVICE="eth0"' and make sure there
is no HWADDR="..." line. Reboot and you should be golden.

He's going to have to create an ifcfg file for this device, right? Will the ifup do the right thing for an em hardware interface renamed to eth (don't have em so can't compare)

--
Bill Davidsen <davidsen@xxxxxxx>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux