Remove cloudy interfaces in dhcp-all-interfaces

Moves the code that removes default cloud interfaces
into the dhcp-all-interfaces element. Having it live in
stable-interface-names won't work right now because we
need this for virtualized testing.

Change-Id: I3166951c6fbb2faec53ffc339edd2fd0c3512300
This commit is contained in:
Dan Prince 2014-04-11 14:16:10 -04:00
parent ed5a872adf
commit 0a797c86de
2 changed files with 16 additions and 16 deletions

View File

@ -0,0 +1,16 @@
#!/bin/bash
# Cloud images may hard code the eth0 interfaces so they
# boots w/ DHCP.
# Fedora
IFCFG_NETSCRIPT="/etc/sysconfig/network-scripts/ifcfg-eth0"
if [ -f $IFCFG_NETSCRIPT ]; then
rm $IFCFG_NETSCRIPT
fi
# Ubuntu
ENI_ETH0_CFG="/etc/network/interfaces.d/eth0.cfg"
if [ -f $ENI_ETH0_CFG ]; then
rm $ENI_ETH0_CFG
fi

View File

@ -7,19 +7,3 @@ if [ -h $NET_NAME_SLOT_FILE ]; then
fi
install-packages biosdevname
# Fedora/RHEL cloud images may hard code the eth0 interface
# so it boots w/ DHCP. We remove this file here so it
# doesn't interfere w/ stable interface naming
IFCFG_NETSCRIPT="/etc/sysconfig/network-scripts/ifcfg-eth0"
if [ -f $IFCFG_NETSCRIPT ]; then
rm $IFCFG_NETSCRIPT
fi
# Ubuntu may hard code the eth0 interface for DHCP
# We remove this file here so it doesn't interfere w/
# stable interface naming
ENI_ETH0_CFG="/etc/network/interfaces.d/eth0.cfg"
if [ -f $ENI_ETH0_CFG ]; then
rm $ENI_ETH0_CFG
fi