Skip to content

Commit

Permalink
distro-specific: systemd-resolved: don't impose 1.0.0.1 DNS server on…
Browse files Browse the repository at this point in the history
  • Loading branch information
rpardini authored and igorpecovnik committed Sep 10, 2024
1 parent e59f22e commit a1b1d61
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/functions/rootfs/distro-specific.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,8 @@ function install_distribution_specific() {

# Set DNS server if systemd-resolved is in use
if [[ -n "$NAMESERVER" && -f "${SDCARD}"/etc/systemd/resolved.conf ]]; then
display_alert "Setup DNS server for systemd-resolved" "${NAMESERVER}" "info"

# Use resolved.conf.d/ directory as recommended by resolved itself
mkdir -p "${SDCARD}"/etc/systemd/resolved.conf.d/

cat <<- EOF > "${SDCARD}"/etc/systemd/resolved.conf.d/00-armbian-default-dns.conf
# Added by Armbian
#
# See resolved.conf(5) for details
[Resolve]
DNS=${NAMESERVER}
EOF
display_alert "Using systemd-resolved" "for DNS management" "info"
# This used to set a default DNS entry from $NAMESERVER into "${SDCARD}"/etc/systemd/resolved.conf.d/00-armbian-default-dns.conf -- no longer; better left to DHCP.
fi

# cleanup motd services and related files
Expand Down

0 comments on commit a1b1d61

Please sign in to comment.