Adding casper 1.71+debian-1.
[live-boot-grml.git] / scripts / casper-bottom / 18hostname
1 #! /bin/sh
2
3 PREREQ=""
4 DESCRIPTION="Setting hostname..."
5
6 . /scripts/casper-functions
7
8 prereqs()
9 {
10        echo "$PREREQ"
11 }
12
13 case $1 in
14 # get pre-requisites
15 prereqs)
16        prereqs
17        exit 0
18        ;;
19 esac
20
21 log_begin_msg "$DESCRIPTION"
22
23 echo "$HOST" > /root/etc/hostname
24 cat > /root/etc/hosts <<EOF
25 127.0.0.1 localhost
26 127.0.1.1 $HOST
27
28 # The following lines are desirable for IPv6 capable hosts
29 ::1     ip6-localhost ip6-loopback
30 fe00::0 ip6-localnet
31 ff00::0 ip6-mcastprefix
32 ff02::1 ip6-allnodes
33 ff02::2 ip6-allrouters
34 ff02::3 ip6-allhosts
35
36 EOF
37
38 log_end_msg