Stop systemd-resolve from booting on our images

It seems with ubuntu-bionic, systemd-resolve boots by default. This is
then overwriting our /etc/resolv.conf file with its nameserver
address.

Change-Id: I3de217505cc0ba18a233e8712be49c5347a8e29b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-03-28 22:07:01 -04:00
parent 7f870cc05b
commit da15523595
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 5 additions and 0 deletions

View File

@ -173,6 +173,11 @@ case "$DIB_INIT_SYSTEM" in
# nothing to do
;;
systemd)
# If systemd-resolved is installed, stop it from running. We want to use unbound
# to manage our DNS requests.
if $(systemctl -q is-enabled systemd-resolved.service); then
systemctl disable systemd-resolved.service
fi
systemctl enable unbound.service
;;
openrc)