build-debian: Enable systemd-resolved

Fixes #8.
This commit is contained in:
Johan Gunnarsson 2022-06-17 17:48:26 +02:00
parent 1b057a2dbe
commit 8e9569ea77
1 changed files with 4 additions and 0 deletions

View File

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