Skip to content

Commit

Permalink
cli: Use recommended method for symlinking /etc/resolv.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ColorfulRhino authored and igorpecovnik committed Jun 20, 2024
1 parent 497c6dc commit 78bd36b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/functions/rootfs/post-tweaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 78bd36b

Please sign in to comment.