Files
tripleo-puppet-elements/elements/remove-resolvconf/cleanup.d/90-remove-resolvconf
Alex Schultz c38d7ff551 Create element to purge resolv.conf
We should be managing the network configuration with os-net-config or
elsewhere so we should not be providing a nameserver in resolv.conf
in overcloud images. This element will be used to ensure that the
resolv.conf of the overcloud-full image should not contain any
nameservers.

Change-Id: If8c44137d120059b356675a074e3af23ea63a6f8
Partial-Bug: #1749756
2018-02-16 18:19:37 -07:00

15 lines
496 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Clear the resolv.conf so that the nameserver configuration does not inherit
# any incorrect nameservers from the image. LP#1749756
# NOTE: This relies on the fact the DIB copies the original resolv.conf and
# during the finalise_base function in img-functions (in DIB) copies the old
# one back in place after the build process completes.
sudo sed -i '/nameserver/d' $TARGET_ROOT/etc/resolv.conf.ORIG