From 1462b8078170e72c899f44916420d6ac38386afd Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Fri, 20 Nov 2020 17:49:11 +0100 Subject: [PATCH] simple-init: also remove en* interfaces from the images Modern distros use more creative interface naming, e.g. CentOS 8 adds both eth0 and ens3 (!). Remove everything. Change-Id: Ibdebdb09ea790787840cf9b817d4eb549ef18249 --- .../install.d/60-simple-init-remove-interfaces | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces b/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces index 8d21932e9..4e62f36bf 100755 --- a/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces +++ b/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces @@ -6,20 +6,20 @@ fi set -eu set -o pipefail -# Cloud images may hard code the eth0 interfaces so they +# Cloud images may hard code the eth0/ens* interfaces so they # boot with DHCP. # Fedora rm -f /etc/sysconfig/network-scripts/ifcfg-eth* +rm -f /etc/sysconfig/network-scripts/ifcfg-en* # SUSE rm -f /etc/sysconfig/network/ifcfg-eth* +rm -f /etc/sysconfig/network/ifcfg-en* -# Ubuntu -rm -f /etc/network/interfaces.d/eth* - -# Debian +# Ubuntu and Debian rm -f /etc/network/interfaces.d/eth* +rm -f /etc/network/interfaces.d/en* # Gentoo rm -f /etc/conf.d/net*