From: Michael Tremer Date: Mon, 22 Mar 2010 22:10:07 +0000 (+0100) Subject: naoki: Add /etc/hosts to chroot which will resolve localhost. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47540df94d0f6691af3debb05a0f9c7caeed4c06;p=ipfire-3.x.git naoki: Add /etc/hosts to chroot which will resolve localhost. Indirectly fixes bug #596. --- diff --git a/naoki/chroot.py b/naoki/chroot.py index 73c29dacd..0050af577 100644 --- a/naoki/chroot.py +++ b/naoki/chroot.py @@ -238,6 +238,11 @@ class Environment(object): f.write("nameserver %s" % nameserver) f.close() + self.log.debug("Creating record for localhost") + f = open(self.chrootPath("etc", "hosts"), "w") + f.write("127.0.0.1 localhost\n") + f.close() + def _mountall(self): """mount 'normal' fs like /dev/ /proc/ /sys""" for cmd in self.mountCmds: