Browse Source

Add hostname to /etc/hosts

pull/342/head
Serge Schneider 2 years ago
parent
commit
95ba042c83
3 changed files with 1 additions and 10 deletions
  1. +0
    -9
      stage1/02-net-tweaks/00-patches/01-hosts.diff
  2. +0
    -1
      stage1/02-net-tweaks/00-patches/series
  3. +1
    -0
      stage1/02-net-tweaks/00-run.sh

+ 0
- 9
stage1/02-net-tweaks/00-patches/01-hosts.diff View File

@ -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

+ 0
- 1
stage1/02-net-tweaks/00-patches/series View File

@ -1 +0,0 @@
01-hosts.diff

+ 1
- 0
stage1/02-net-tweaks/00-run.sh View File

@ -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"

Loading…
Cancel
Save