Remove unnecessary interface configurations

The image building process adds some unnecessary network interface
configuration files to /etc/network/interfaces.d. This element cleans those
out as they are not needed because cloud-init will create the required
configuration file.

Change-Id: If5fbfc34ff0e91608f402811aa2b78c9cbcb00ec
This commit is contained in:
Michael Johnson 2018-07-06 15:59:26 -07:00
parent 4a5c24ef6f
commit 7ad61bb451
3 changed files with 15 additions and 0 deletions

View File

@ -407,6 +407,7 @@ AMP_element_sequence="$AMP_element_sequence no-resolvconf"
AMP_element_sequence="$AMP_element_sequence amphora-agent" AMP_element_sequence="$AMP_element_sequence amphora-agent"
AMP_element_sequence="$AMP_element_sequence sos" AMP_element_sequence="$AMP_element_sequence sos"
AMP_element_sequence="$AMP_element_sequence cloud-init-datasources" AMP_element_sequence="$AMP_element_sequence cloud-init-datasources"
AMP_element_sequence="$AMP_element_sequence remove-default-ints"
if [ "$AMP_ENABLE_FULL_MAC_SECURITY" -ne 1 ]; then if [ "$AMP_ENABLE_FULL_MAC_SECURITY" -ne 1 ]; then
# SELinux systems # SELinux systems

View File

@ -0,0 +1,6 @@
This element removes any default network interfaces from the interface
configuration in the image. These are not needed in the amphora as cloud-init
will create the required default interface configuration files.
For Ubuntu this element will remove the network
configuration files from /etc/network/interfaces.d.

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -eu
set -o xtrace
if [[ "$DISTRO_NAME" == "ubuntu" ]]; then
sudo rm -f /etc/network/interfaces.d/*
fi