This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via e451cb28f48dca8511e9707b9d8866419a335e3c (commit) from 9023bb126871c7ba1e75be3ebaadaa24331c7fb3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e451cb28f48dca8511e9707b9d8866419a335e3c Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Mar 21 15:28:00 2010 +0100
naoki: Add DNS support in chroot.
-----------------------------------------------------------------------
Summary of changes: naoki/chroot.py | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
Difference in files: diff --git a/naoki/chroot.py b/naoki/chroot.py index a4a99a5..73c29da 100644 --- a/naoki/chroot.py +++ b/naoki/chroot.py @@ -85,6 +85,7 @@ class Environment(object):
self._setupDev() self._setupUsers() + self._setupDns()
self.toolchain.extract(self.chrootPath())
@@ -221,6 +222,22 @@ class Environment(object): g.close() f.close()
+ def _setupDns(self): + self.log.debug("Setting up DNS") + nameservers = [] + f = open("/etc/resolv.conf") + for line in f.readlines(): + if line.startswith("nameserver"): + nameservers.append(line.split(" ")[-1]) + f.close() + + self.log.debug("Using nameservers: %s" % nameservers) + + f = open(self.chrootPath("etc", "resolv.conf"), "w") + for nameserver in nameservers: + f.write("nameserver %s" % nameserver) + f.close() + def _mountall(self): """mount 'normal' fs like /dev/ /proc/ /sys""" for cmd in self.mountCmds:
hooks/post-receive -- IPFire 3.x development tree