diff --git a/elements/amphora-agent/static/etc/NetworkManager/conf.d/dns-none.conf b/elements/amphora-agent/static/etc/NetworkManager/conf.d/dns-none.conf new file mode 100644 index 0000000000..9032e19419 --- /dev/null +++ b/elements/amphora-agent/static/etc/NetworkManager/conf.d/dns-none.conf @@ -0,0 +1,4 @@ +[main] +# Set dns to none, it prevents NetworkManager to update the /etc/resolv.conf +# file. +dns=none diff --git a/elements/no-resolvconf/finalise.d/99-disable-resolv-conf b/elements/no-resolvconf/finalise.d/99-disable-resolv-conf index d7d6c7f7d2..1bdddad379 100755 --- a/elements/no-resolvconf/finalise.d/99-disable-resolv-conf +++ b/elements/no-resolvconf/finalise.d/99-disable-resolv-conf @@ -1,6 +1,9 @@ #!/bin/bash -echo "" > /etc/resolv.conf -echo "" > /etc/resolv.conf.ORIG + +# Override resolv.conf file from DIB with a custom one. +# Having at least one nameserver is now required by dnfpython (>=) +echo "nameserver 127.0.0.1" > /etc/resolv.conf +echo "nameserver 127.0.0.1" > /etc/resolv.conf.ORIG if [ -d /etc/dhcp/dhclient-enter-hooks.d ] then # Debian/Ubuntu