From 425d51e38b63e3e55558d95e56518a4a53c01a26 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Sun, 11 Jan 2009 16:21:14 +0100
Subject: Prefering local hosts over truncated one.

---
 helpers/lh_chroot_hosts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts
index 7858273..2795a59 100755
--- a/helpers/lh_chroot_hosts
+++ b/helpers/lh_chroot_hosts
@@ -77,7 +77,12 @@ EOF
 		# Creating lock file
 		Create_lockfile .lock
 
-		if [ -f chroot/etc/hosts.orig ]
+		if [ -e config/chroot_local-includes/etc/hosts ]
+		then
+			# Copying local hosts
+			cp -a config/chroot_local-includes/etc/hosts chroot/etc/hosts
+			rm -f chroot/etc/hosts.orig
+		elif [ -f chroot/etc/hosts.orig ]
 		then
 			# Restore hosts file
 			mv chroot/etc/hosts.orig chroot/etc/hosts
-- 
cgit v1.0