integrate-distro.sh: Generate /etc/hosts from content entirely defined in the script

This commit is contained in:
Jan Lindemann 2011-08-14 18:52:45 +00:00 committed by Jan Lindemann
commit 1b4166e798

View file

@ -476,14 +476,20 @@ EOT
make_etc_hosts()
{
cat /etc/hosts
# TODO: there must be an easier frontend for gethostbyname()
local ftp_ip=`ping -c 1 ftp | sed '/PING/ !d; s/.*(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)).*/\1/'`
# TODO: undo or - better yet - obviate the need for this
_cat<<EOT
|$ftp_ip ftp
|127.0.0.1 localhost
|
|# special IPv6 addresses
|::1 localhost ipv6-localhost ipv6-loopback
|
|fe00::0 ipv6-localnet
|
|ff00::0 ipv6-mcastprefix
|ff02::1 ipv6-allnodes
|ff02::2 ipv6-allrouters
|ff02::3 ipv6-allhosts
|127.0.0.1 ldap.lcl
|127.0.0.1 ftp.priv.lcl
EOT
}