Skip to content

Commit

Permalink
Write current hostname to '/etc/hosts'
Browse files Browse the repository at this point in the history
  • Loading branch information
frzb committed Oct 7, 2018
1 parent 702a382 commit 8ae7807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions profiles/coinboot/modules/x0_work_around_dhclient_hostname
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ cat <<'EOF' > "${DEBIRF_ROOT}/etc/dhcp/dhclient-enter-hooks.d/dhcp_hostname"
hostname $(echo $new_ip_address | sed 's/\./-/g')
echo $(hostname) > /etc/hostname
echo "127.0.1.1 $(hostname)" >> /etc/hosts
EOF

# Write /etc/hosts accordingly
cat <<EOF > "${DEBIRF_ROOT}/etc/hosts"
127.0.0.1 localhost
127.0.1.1 localhost
127.0.0.1 localhost
EOF

0 comments on commit 8ae7807

Please sign in to comment.