Merge "Check and remove existing image interface configurations"

This commit is contained in:
Zuul 2021-09-10 15:01:28 +00:00 committed by Gerrit Code Review
commit 3c3ef6e32b

View File

@ -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*