aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2017-10-06 11:31:40 +0300
committerRiku Voipio <riku.voipio@linaro.org>2017-10-06 11:40:30 +0300
commit38db4758f19d0181e36a982a1f109391880c97df (patch)
tree0b23506e81264553f233fb0e085970bb307b483f /files
parent82376fdf93d4247ebcc92f348d4469dc92c3dd43 (diff)
downloadfai-38db4758f19d0181e36a982a1f109391880c97df.tar.gz
Fix hostname and resolving
Hostname was not being properly set up, and we need resolv.conf symlink for final images. Change-Id: Icd6674ca0c740917047a2c8b51a0246178508ee7
Diffstat (limited to 'files')
-rw-r--r--files/etc/hostname/DEBIAN1
-rw-r--r--files/etc/hostname/preinst10
-rw-r--r--files/etc/hosts/DEBIAN8
-rw-r--r--files/etc/hosts/preinst10
4 files changed, 29 insertions, 0 deletions
diff --git a/files/etc/hostname/DEBIAN b/files/etc/hostname/DEBIAN
new file mode 100644
index 0000000..b638194
--- /dev/null
+++ b/files/etc/hostname/DEBIAN
@@ -0,0 +1 @@
+${HOSTNAME}
diff --git a/files/etc/hostname/preinst b/files/etc/hostname/preinst
new file mode 100644
index 0000000..ee32e3a
--- /dev/null
+++ b/files/etc/hostname/preinst
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+# template expansion
+
+# $1 is the class name used
+# $2 is the path to the file copied
+
+envsubst < $2 > $2.tmp
+mv $2.tmp $2
+
diff --git a/files/etc/hosts/DEBIAN b/files/etc/hosts/DEBIAN
new file mode 100644
index 0000000..b087251
--- /dev/null
+++ b/files/etc/hosts/DEBIAN
@@ -0,0 +1,8 @@
+127.0.0.1 localhost
+127.0.1.1 ${HOSTNAME}
+
+# The following lines are desirable for IPv6 capable hosts
+::1 localhost ip6-localhost ip6-loopback
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+
diff --git a/files/etc/hosts/preinst b/files/etc/hosts/preinst
new file mode 100644
index 0000000..ee32e3a
--- /dev/null
+++ b/files/etc/hosts/preinst
@@ -0,0 +1,10 @@
+#! /bin/bash
+
+# template expansion
+
+# $1 is the class name used
+# $2 is the path to the file copied
+
+envsubst < $2 > $2.tmp
+mv $2.tmp $2
+