aboutsummaryrefslogtreecommitdiffstats
path: root/stage1
diff options
context:
space:
mode:
authorSerge Schneider <[email protected]>2019-11-06 14:33:07 +0000
committerSerge Schneider <[email protected]>2019-11-06 14:33:07 +0000
commit95ba042c8393682eecab36e6c7056a28c5cafed4 (patch)
tree16876a648df8ec4eff0fe9b167703a6facccdc98 /stage1
parentd30343f626916a5b6f23cec67df919bd5a5b643a (diff)
Add hostname to /etc/hosts
Diffstat (limited to 'stage1')
-rw-r--r--stage1/02-net-tweaks/00-patches/01-hosts.diff9
-rw-r--r--stage1/02-net-tweaks/00-patches/series1
-rwxr-xr-xstage1/02-net-tweaks/00-run.sh1
3 files changed, 1 insertions, 10 deletions
diff --git a/stage1/02-net-tweaks/00-patches/01-hosts.diff b/stage1/02-net-tweaks/00-patches/01-hosts.diff
deleted file mode 100644
index ad07ae5..0000000
--- a/stage1/02-net-tweaks/00-patches/01-hosts.diff
+++ /dev/null
@@ -1,9 +0,0 @@
-Index: jessie-stage1/rootfs/etc/hosts
-===================================================================
---- jessie-stage1.orig/rootfs/etc/hosts
-+++ jessie-stage1/rootfs/etc/hosts
-@@ -3,3 +3,4 @@
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
-
-+127.0.1.1 raspberrypi
diff --git a/stage1/02-net-tweaks/00-patches/series b/stage1/02-net-tweaks/00-patches/series
deleted file mode 100644
index 3dc19a2..0000000
--- a/stage1/02-net-tweaks/00-patches/series
+++ /dev/null
@@ -1 +0,0 @@
-01-hosts.diff
diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh
index 8637edc..fc9e763 100755
--- a/stage1/02-net-tweaks/00-run.sh
+++ b/stage1/02-net-tweaks/00-run.sh
@@ -1,5 +1,6 @@
#!/bin/bash -e
echo "${HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
+echo "127.0.1.1 ${HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"
ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"