From 8e9569ea776174c78ac73dc0fb588bebe8dc8bc1 Mon Sep 17 00:00:00 2001 From: Johan Gunnarsson Date: Fri, 17 Jun 2022 17:48:26 +0200 Subject: [PATCH] build-debian: Enable systemd-resolved Fixes #8. --- scripts/build-debian | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build-debian b/scripts/build-debian index bcc754e..40afdb2 100755 --- a/scripts/build-debian +++ b/scripts/build-debian @@ -126,6 +126,7 @@ chroot debian /bin/sh -ex <<- EOF /usr/bin/apt-get clean /bin/rm -rf /var/lib/apt/lists/* /usr/bin/systemctl enable systemd-networkd.service +/usr/bin/systemctl enable systemd-resolved.service /bin/rm -f /var/log/*.log /bin/echo root:${PASSWORD} | /usr/sbin/chpasswd /bin/sed -i "s/#*\s*PermitRootLogin .*/PermitRootLogin yes/" /etc/ssh/sshd_config @@ -139,6 +140,9 @@ cp -rv --preserve=mode ../2nd-stage-files/post-2nd-stage-files/* debian # Set hostname echo "${OS}" > debian/etc/hostname +# Set resolv.conf +ln -sf /run/systemd/resolve/stub-resolv.conf debian/etc/resolv.conf + # List all files find debian ! -type d -printf "/%P\n" | sort > files.txt