From cd5110f6b8eb77519d704972276cfd5be6bff055 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:05:13 +0200 Subject: Adding live-helper 1.0~a17-1. --- helpers/lh_chroot_hosts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'helpers/lh_chroot_hosts') 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 -- cgit v1.2.3