From 95ba042c8393682eecab36e6c7056a28c5cafed4 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 6 Nov 2019 14:33:07 +0000 Subject: [PATCH] Add hostname to /etc/hosts --- stage1/02-net-tweaks/00-patches/01-hosts.diff | 9 --------- stage1/02-net-tweaks/00-patches/series | 1 - stage1/02-net-tweaks/00-run.sh | 1 + 3 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 stage1/02-net-tweaks/00-patches/01-hosts.diff delete mode 100644 stage1/02-net-tweaks/00-patches/series 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"