From 1bb2bc244affed23d3f36320884496e219caec41 Mon Sep 17 00:00:00 2001 From: Michael Stucki Date: Thu, 6 Jun 2013 22:28:15 +0200 Subject: [PATCH] Use 127.0.1.1 for local host name alias Fixes #91 --- boxes/debian/lxc-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boxes/debian/lxc-template b/boxes/debian/lxc-template index 1a9d145..33e9197 100755 --- a/boxes/debian/lxc-template +++ b/boxes/debian/lxc-template @@ -69,7 +69,7 @@ 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" \ + "s/^127.0.0.1\(\s\+\)localhost$/127.0.0.1\1localhost\n127.0.1.1\1${hostname}/g" \ /etc/hosts >/dev/null 2>&1 || true fi