From 2961ca6db5367f38fd9225d82da04baf91eaf730 Mon Sep 17 00:00:00 2001 From: lub Date: Sat, 5 Nov 2022 05:15:51 +0100 Subject: [PATCH] add fqdn to hosts file fixes #4 --- config/etc/hosts | 4 ++++ post-debootstrap-installer.sh | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 config/etc/hosts diff --git a/config/etc/hosts b/config/etc/hosts new file mode 100644 index 0000000..70a59f7 --- /dev/null +++ b/config/etc/hosts @@ -0,0 +1,4 @@ +127.0.0.1 localhost %fqdn% +::1 localhost ip6-localhost ip6-loopback %fqdn% +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters diff --git a/post-debootstrap-installer.sh b/post-debootstrap-installer.sh index 7ab61e2..f596e5b 100755 --- a/post-debootstrap-installer.sh +++ b/post-debootstrap-installer.sh @@ -127,6 +127,8 @@ apt-get -y --purge autoremove apt-get -y install unbound +# add fqdn to hosts file to mitigate nameserver failure +sed -i "s/%fqdn%/$(hostname)/g" /etc/hosts # as last step set dns to local, # as unbound isn't running in the live/rescue system chroot,