From fc0a635bc48a0293c43da01207e9095039198911 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Tue, 28 Mar 2017 14:56:51 -0400 Subject: [PATCH] zero out resolv.conf during install Anaconda is writing an /etc/resolv.conf from the install environment. The system should start out with an empty file, otherwise cloud-init will try to use this information and may error: https://bugs.launchpad.net/cloud-init/+bug/1670052 --- fedora-atomic.ks | 6 ++++++ fedora-cloud-base.ks | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/fedora-atomic.ks b/fedora-atomic.ks index 5bf043a..d48f787 100644 --- a/fedora-atomic.ks +++ b/fedora-atomic.ks @@ -131,4 +131,10 @@ echo "Adding Developer Mode GRUB2 menu item." # fails due to RHBZ #1369794 /sbin/chkconfig network off +# Anaconda is writing an /etc/resolv.conf from the install environment. +# The system should start out with an empty file, otherwise cloud-init +# will try to use this information and may error: +# https://bugs.launchpad.net/cloud-init/+bug/1670052 +truncate -s 0 /etc/resolv.conf + %end diff --git a/fedora-cloud-base.ks b/fedora-cloud-base.ks index d2d9515..966bb9f 100644 --- a/fedora-cloud-base.ks +++ b/fedora-cloud-base.ks @@ -255,5 +255,11 @@ rm -f /etc/sysconfig/network-scripts/ifcfg-ens3 rm -f /etc/machine-id touch /etc/machine-id +# Anaconda is writing an /etc/resolv.conf from the install environment. +# The system should start out with an empty file, otherwise cloud-init +# will try to use this information and may error: +# https://bugs.launchpad.net/cloud-init/+bug/1670052 +truncate -s 0 /etc/resolv.conf + %end