Skip to content

Commit

Permalink
Register DNS server in systemd-resolved
Browse files Browse the repository at this point in the history
When configuring DNS, do so in resolved too, not only plain
/etc/resolv.conf. The former should load the latter, but it saves one
indirection (resolved is used via NSS directly, at least on Fedora, even
if /etc/resolv.conf points somewhere else).

Related to QubesOS/qubes-issues#7429
  • Loading branch information
marmarek committed Apr 12, 2022
1 parent cde610d commit 0b028df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions network/setup-ip
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ configure_network() {
echo "nameserver $secondary_dns" >> /etc/resolv.conf
fi
fi
if [ -x /usr/bin/resolvectl ] && \
systemctl is-enabled -q systemd-resolved.service && \
! qsvc disable-dns-server ; then
resolvectl dns "$INTERFACE" "$primary_dns" "$secondary_dns"
fi
}

configure_network_nm() {
Expand Down

0 comments on commit 0b028df

Please sign in to comment.