summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-11 16:21:14 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:39 +0100
commit425d51e38b63e3e55558d95e56518a4a53c01a26 (patch)
tree191dfd69b6d8becbe9f9dad2e240e5193890b267
parenta7334c6c16f7c1b0d2037fba858be029c0822ce5 (diff)
downloadlive-build-425d51e38b63e3e55558d95e56518a4a53c01a26.zip
live-build-425d51e38b63e3e55558d95e56518a4a53c01a26.tar.gz
Prefering local hosts over truncated one.
-rwxr-xr-xhelpers/lh_chroot_hosts7
1 files changed, 6 insertions, 1 deletions
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