diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:13 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:25 +0100 |
commit | cd5110f6b8eb77519d704972276cfd5be6bff055 (patch) | |
tree | 3bc1bcdbff4ec3bd5a82ae34d9efed47b157e3e0 /helpers/lh_chroot_hosts | |
parent | fdef63e60c2e68226da2fe92d6cc393c1af2b801 (diff) | |
download | vyos-live-build-cd5110f6b8eb77519d704972276cfd5be6bff055.tar.gz vyos-live-build-cd5110f6b8eb77519d704972276cfd5be6bff055.zip |
Adding live-helper 1.0~a17-1.
Diffstat (limited to 'helpers/lh_chroot_hosts')
-rwxr-xr-x | helpers/lh_chroot_hosts | 14 |
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 |