Bug 158774 - Interfaces are not renamed by if-eth if they don't exist
Interfaces are not renamed by if-eth if they don't exist
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-25 12:06 EDT by Pavel Roskin
Modified: 2014-03-16 22:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-25 12:52:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch that fixes the problem (535 bytes, patch)
2005-05-25 12:11 EDT, Pavel Roskin
no flags Details | Diff
better patch (812 bytes, patch)
2005-05-25 12:28 EDT, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Pavel Roskin 2005-05-25 12:06:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050512 Fedora/1.0.4-2 Firefox/1.0.4

Description of problem:
/etc/sysconfig/network-scripts/ifup-eth would rename an interface if DEVICE and HWADDR are set in /etc/sysconfig/network-scripts/ifcfg-NAME.  However, it will only happen if DEVICE is already occupied by another device with a different MAC address.

Version-Release number of selected component (if applicable):
initscripts-8.11-1

How reproducible:
Always

Steps to Reproduce:
1. Rename /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-tu0
2. Change DEVICE=eth0 to DEVICE=tu0 in that file.
3. Reboot.
  

Actual Results:  The interface is down, still called eth0.

Expected Results:  The interface is up under the name tu0.

Additional info:

I believe the scope of the bug is wider that support for custom names.  Suppose a system has eth0 and eth1.  The hardware for eth0 is removed.  The old eth1 becomes eth0.  It needs to be removed to eth1, but it fails because there is no eth1 already in the system.
Comment 1 Pavel Roskin 2005-05-25 12:11:45 EDT
Created attachment 114838 [details]
Patch that fixes the problem

There is no need to check if FOUNDMACADDR is not empty.  In fact, things are
even better if FOUNDMACADDR is empty, because we don't need to care about
another interface occupying the name.
Comment 2 Bill Nottingham 2005-05-25 12:18:22 EDT
What's your /etc/modprobe.conf look like in this case?
Comment 3 Bill Nottingham 2005-05-25 12:28:54 EDT
Created attachment 114840 [details]
better patch

Actually, this is what you need, otherwise you'll run back into 131461 and
143674.
Comment 4 Bill Nottingham 2005-05-25 12:52:17 EDT
Will be in 8.11.1-1 and later.
Comment 5 Pavel Roskin 2005-05-26 16:19:56 EDT
Everything is working after "yum upgrade".  Thank you!

As for /etc/modprobe.conf, I'm using a custom solid kernel, so it's probalby
irrelevant.  But just in case, here it is:

alias scsi_hostadapter ata_piix                                                
                
alias snd-card-0 snd-intel8x0                                                  
                
options snd-card-0 index=0                                                     
                
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 &&
/usr/sbin/alsactl restore >/dev/null 2>&1 || :                                 
                                           
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-intel8x0                                 
                                        
alias usb-controller ehci-hcd                                                  
                
alias usb-controller1 uhci-hcd                                                 
                
alias tg0 tg3                                                                  
                
alias ee0 eepro100                                                             
                
alias tu0 tulip                                                                
                

Note You need to log in before you can comment on or make changes to this bug.