Integrate feedback from Thomas Lange (thanks for the review!)
[grml-live.git] / etc / grml / fai / config / scripts / GRML / 34-hosts
1 #!/bin/sh
2 set -u
3 set -e
4
5 HOSTNAME=''
6 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
7 [ -n "$HOSTNAME" ] || HOSTNAME=grml
8
9 # FIXME: use /etc/grml/fai/... as base
10 cat > $target/etc/hosts << EOF
11 127.0.0.1       $HOSTNAME    localhost
12
13 # The following lines are desirable for IPv6 capable hosts
14 # (added automatically by netbase upgrade)
15
16 ::1     ip6-localhost ip6-loopback $HOSTNAME
17 fe00::0 ip6-localnet
18 ff00::0 ip6-mcastprefix
19 ff02::1 ip6-allnodes
20 ff02::2 ip6-allrouters
21 ff02::3 ip6-allhosts
22 EOF