cli: Use recommended method for symlinking /etc/resolv.conf

This commit is contained in:
ColorfulRhino
2024-06-19 13:59:39 +02:00
committed by Igor
parent 497c6dce0e
commit 78bd36b5a6

View File

@@ -18,7 +18,8 @@ function post_debootstrap_tweaks() {
if [[ -d "${SDCARD}"/etc/systemd/network ]]; then
display_alert "Activating systemd-resolved" "Symlink resolv.conf to systemd-resolved's" "debug"
run_host_command_logged rm -fv "${SDCARD}"/etc/resolv.conf
run_host_command_logged ln -s /run/systemd/resolve/resolv.conf "${SDCARD}"/etc/resolv.conf
# The method of symlinking to /run/systemd/resolve/stub-resolv.conf is recommended, see https://www.man7.org/linux/man-pages/man8/systemd-resolved.service.8.html
run_host_command_logged ln -s /run/systemd/resolve/stub-resolv.conf "${SDCARD}"/etc/resolv.conf
fi
fi