diskimage-builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces

17 lines
269 B
Text
Raw Normal View History

#!/bin/bash
set -eu
set -o pipefail
# Cloud images may hard code the eth0 interfaces so they
# boot with DHCP.
# Fedora
rm -f /etc/sysconfig/network-scripts/ifcfg-eth0
# Ubuntu
rm -f /etc/network/interfaces.d/eth0.cfg
# Debian
rm -f /etc/network/interfaces.d/eth0