summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_hosts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:13 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:25 +0100
commitcd5110f6b8eb77519d704972276cfd5be6bff055 (patch)
tree3bc1bcdbff4ec3bd5a82ae34d9efed47b157e3e0 /helpers/lh_chroot_hosts
parentfdef63e60c2e68226da2fe92d6cc393c1af2b801 (diff)
downloadlive-build-cd5110f6b8eb77519d704972276cfd5be6bff055.zip
live-build-cd5110f6b8eb77519d704972276cfd5be6bff055.tar.gz
Adding live-helper 1.0~a17-1.
Diffstat (limited to 'helpers/lh_chroot_hosts')
-rwxr-xr-xhelpers/lh_chroot_hosts14
1 files changed, 11 insertions, 3 deletions
diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts
index 9807433..2cd8f08 100755
--- a/helpers/lh_chroot_hosts
+++ b/helpers/lh_chroot_hosts
@@ -51,13 +51,21 @@ case "${1}" in
if [ -f chroot/etc/hosts ]
then
# Save hosts file
- cp chroot/etc/hosts chroot/etc/hosts.orig
+ mv chroot/etc/hosts chroot/etc/hosts.orig
fi
+ # Creating hosts file
+
+cat > chroot/etc/hosts << EOF
+127.0.0.1 localhost localhost.localdomain
+127.0.1.1 debian
+EOF
+
if [ -f /etc/hosts ]
then
- # Copy hosts file
- cp /etc/hosts chroot/etc/hosts
+ # Append hosts file
+ #grep -e "127.0.0.1" -e "127.0.1.1" /etc/hosts >> chroot/etc/hosts
+ cat /etc/hosts >> chroot/etc/hosts
fi
# Creating stage file