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>2007-09-23 10:05:13 +0200
commitae5c245c5d0b910b9fde27f99668c46f64f9bcc2 (patch)
tree3bc1bcdbff4ec3bd5a82ae34d9efed47b157e3e0 /helpers/lh_chroot_hosts
parentb88a20b5ddd2c64c9b1f072905dce8eb9e09fc0d (diff)
downloadvyos-live-build-ae5c245c5d0b910b9fde27f99668c46f64f9bcc2.tar.gz
vyos-live-build-ae5c245c5d0b910b9fde27f99668c46f64f9bcc2.zip
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 980743302..2cd8f0873 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