From a666916a72609551f1c6e39dd4546d5a928741f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Mon, 9 Dec 2019 08:48:31 +0100 Subject: [PATCH] Fedora image: initialize /etc/hosts --- fedora-build-opennebula-image.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fedora-build-opennebula-image.sh b/fedora-build-opennebula-image.sh index 77d6a0b..40f5d12 100755 --- a/fedora-build-opennebula-image.sh +++ b/fedora-build-opennebula-image.sh @@ -110,6 +110,13 @@ mount --bind /sys /mnt/sys # TODO: use non-$BIGCORP DNS service. echo 'nameserver 1.1.1.1' >> /mnt/etc/resolv.conf +# Initialize /etc/hosts. +cat > /mnt/etc/hosts << EOF +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 + +EOF + # See https://github.com/OpenNebula/addon-context-linux/issues/121 for details. # network-scripts.x86_64 : Legacy scripts for manipulating of network devices run_root dnf -y install network-scripts