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:
parent
ed5a872adf
commit
0a797c86de
16
elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces
Executable file
16
elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces
Executable 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
|
@ -7,19 +7,3 @@ if [ -h $NET_NAME_SLOT_FILE ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
install-packages biosdevname
|
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user