Re: Using eth0 on desktops with single network interface

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



On Apr 19, 2012, at 14:14, Scott Robbins wrote:

> What I do is this for an existing one.  
> 
> I change /etc/sysconfig/network-scripts/ifcfg-whatever to ifcfg-eth0 (or
> whatever it might be, e.g., eth0 and eth1).  

I ended up writing a script to automate this on my CentOS 6 systems which looks like this:

    #/bin/sh
    rpm -q biosdevname && yum erase -y biosdevname
    if [ -e /etc/sysconfig/network-scripts/ifcfg-em1 ]; then
        mv /etc/sysconfig/network-scripts/ifcfg-em1 /etc/sysconfig/network-scripts/ifcfg-eth0
        sed -i -e '/DEVICE=/s/em1/eth0/' /etc/sysconfig/network-scripts/ifcfg-eth0
    fi

I've tested it on one system and it appeared to work fine, so I will deploy it to all my other systems over the weekend.

Alfred
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux