From c3e6eb4e5197904043b2a7b41f0e705ce1dc8f1c Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Thu, 27 Jun 2013 01:30:18 -0300 Subject: [PATCH] Manually apply #92 on new finalize script used to build V3 base boxes --- boxes/debian/finalize | 19 +++++++++++++------ boxes/ubuntu/finalize | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/boxes/debian/finalize b/boxes/debian/finalize index 67681d4..fcbfd6f 100755 --- a/boxes/debian/finalize +++ b/boxes/debian/finalize @@ -66,12 +66,19 @@ EOF $hostname EOF - # set the host in case it is not set so that sudo does not complain about the host - if ! (grep -q $hostname $rootfs/etc/hosts); then - chroot $rootfs sed -i -e \ - "s/^127.0.0.1\(\s\+\)localhost$/127.0.0.1\1localhost\n127.0.0.1\1${hostname}/g" \ - /etc/hosts >/dev/null 2>&1 || true - fi + # set minimal hosts + cat < $rootfs/etc/hosts +127.0.0.1 localhost +127.0.1.1 $hostname + +# The following lines are desirable for IPv6 capable hosts +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts +EOF # set default locale cat < $rootfs/etc/locale.gen diff --git a/boxes/ubuntu/finalize b/boxes/ubuntu/finalize index eddbe68..a2c4fbc 100755 --- a/boxes/ubuntu/finalize +++ b/boxes/ubuntu/finalize @@ -67,6 +67,7 @@ fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters +ff02::3 ip6-allhosts EOF if [ ! -f $rootfs/etc/init/container-detect.conf ]; then