I edit /etc/resolvconf/resolv.conf.d/base
:
$ cat /etc/resolvconf/resolv.conf.d/base
nameserver 192.168.100.16
I force an update:
$ sudo resolvconf -u
I check if it worked:
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.100.4
nameserver 192.168.100.3
nameserver 192.168.100.2
search openstacklocal
It didn't. Read the resolvconf
manpage. Maybe updates are disabled?
--updates-are-enabled
Return 0 if the flag is set, otherwise return 1.
Let's see:
$ resolvconf --updates-are-enabled
$ echo $?
0
It is enabled then (right? 0 means enabled?). It might be that it was disabled before, I have also run sudo resolvconf --enable-updates
. I will force the update again (even though being enabled should be enough):
$ sudo resolvconf -u
Let's check again:
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.100.4
nameserver 192.168.100.3
nameserver 192.168.100.2
search openstacklocal
Nothing, zilch, nada! :(
Why is /etc/resolv.conf
not being updated?
My system is:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial