summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/18hostname
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:46:36 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:25:50 +0100
commit9fc9e2a1a11b0edada38cb501fefe4f58aa414ac (patch)
tree7d2d89ecfbd394b41854937ec2342bc7ae530cf5 /scripts/live-bottom/18hostname
parent4bdaa2237c6ae923d1dd068e9024ebceca3f40d9 (diff)
downloadlive-boot-9fc9e2a1a11b0edada38cb501fefe4f58aa414ac.tar.gz
live-boot-9fc9e2a1a11b0edada38cb501fefe4f58aa414ac.zip
Adding live-initramfs 1.87.2-1.
Diffstat (limited to 'scripts/live-bottom/18hostname')
-rwxr-xr-xscripts/live-bottom/18hostname38
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname
new file mode 100755
index 0000000..591e4ec
--- /dev/null
+++ b/scripts/live-bottom/18hostname
@@ -0,0 +1,38 @@
+#! /bin/sh
+
+PREREQ=""
+DESCRIPTION="Setting hostname..."
+
+. /scripts/live-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+echo "$HOST" > /root/etc/hostname
+cat > /root/etc/hosts <<EOF
+127.0.0.1 localhost
+127.0.1.1 $HOST
+
+# The following lines are desirable for IPv6 capable hosts
+::1 ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+ff02::3 ip6-allhosts
+
+EOF
+
+log_end_msg