Merge "Check and remove existing image interface configurations"
This commit is contained in:
commit
3c3ef6e32b
@ -6,17 +6,16 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# Cloud images may hard code the eth0 interfaces so they
|
# Cloud images may hard code interfaces so they
|
||||||
# boot with DHCP.
|
# boot with DHCP.
|
||||||
|
|
||||||
# Fedora
|
# RHEL/CentOS/Fedora
|
||||||
rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
|
for ifcfg in $(ls /etc/sysconfig/network-scripts/ifcfg-* | grep -v "ifcfg-lo"); do
|
||||||
|
rm -f $ifcfg
|
||||||
|
done
|
||||||
|
|
||||||
# Ubuntu
|
# Ubuntu/Debian
|
||||||
rm -f /etc/network/interfaces.d/eth*.cfg
|
rm -f /etc/network/interfaces.d/*
|
||||||
|
|
||||||
# Debian
|
|
||||||
rm -f /etc/network/interfaces.d/eth*
|
|
||||||
|
|
||||||
# Gentoo
|
# Gentoo
|
||||||
rm -f /etc/conf.d/net*
|
rm -f /etc/conf.d/net*
|
||||||
|
Loading…
Reference in New Issue
Block a user