From 4f00cd3e8218027e0a36e46f02a2cd0b9a9feb88 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Sat, 10 Jan 2009 21:18:53 +0100
Subject: Truncating resolv.conf created during bootstrap stage, otherwise
 we'll end up with a local resolv.conf in the final image. Thanks to Ben
 Armstrong <synrg@debian.org>.

---
 helpers/lh_chroot_resolv | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index bad2357..afa3036 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -48,6 +48,13 @@ case "${1}" in
 		then
 			# Save resolv file or symlink
 			mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
+
+			# Also truncate it, otherwise we'll end up with the one
+			# created by debootstrap in the final image.
+			#
+			# If you want to have a custom resolv.conf, please
+			# overwrite it with normal local_includes mechanism.
+			Truncate chroot/etc/resolv.conf.orig
 		fi
 
 		if [ -f /etc/resolv.conf ]
-- 
cgit v1.0