[Bug 226185] Re: update-resolv-conf script does not restore old values

Thierry Carrez thierry.carrez at canonical.com
Mon Jul 21 14:47:14 BST 2008


Thanks for your bug report.

update-resolv-conf uses /sbin/resolvconf (if installed) -a and -d
options to handle the update of the /etc/resolv.conf file. If you have
resolvconf installed, the /etc/resolv.conf file should no longer be
edited by hand, otherwise your changes will be lost at next update :
resolvconf doesn't backup/restore configurations, it builds resolv.conf
dynamically.

Try :
$ cp /etc/resolv.conf my_backup_resolv.conf
$ echo nameserver 10.0.0.1 | sudo /sbin/resolvconf -a eth0
$ cat /etc/resolv.conf

$ echo nameserver 192.168.0.1 | sudo /sbin/resolvconf -a eth1
$ cat /etc/resolv.conf

$ sudo /sbin/resolvconf -d eth1
$ cat /etc/resolv.conf
$ sudo mv my_backup_resolv.conf /etc/resolv.conf

You can see that if the original configuration of the /etc/resolv.conf
file was created by resolvconf, everything works ok.

So you should decide if you want to use resolvconf to handle your
/etc/resolv.conf file : if yes, you should provide the original
configuration using /sbin/resolvconf -a to make sure it will not be
overwritten by update-resolv-conf. If not, you should create scripts to
backup/restore your resolv.conf file and use them (instead of update-
resolv-conf) in your openvpn config files.

AFAICT the behavior you're experiencing is the way resolvconf is
designed to work. I'll close this bug as invalid, please feel free to
reopen it if you think I did not properly understand.

** Changed in: openvpn (Ubuntu)
       Status: New => Invalid

-- 
update-resolv-conf script does not restore old values
https://bugs.launchpad.net/bugs/226185
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openvpn in ubuntu.



More information about the Ubuntu-server-bugs mailing list