After a bit of discussion with Steve on IRC, we decided that we don't want to 
prompt the user, even in the weirdest scenario.
Instead, I developed the following list of criteria to determine whether or not 
to link the current resolv.conf to tail:

 1) If "Generated by NetworkManager" in /etc/resolv.conf => exit (it's already 
dynamic, managed by NM, so no need to be appended)
 2) If empty /etc/resolv.conf (no nameserver entry) => exit (it's empty, so no 
need to be appended)
 3) Get list of configured network interfaces "ifquery --allow auto --list" => 
if only loopback in the list => append (at this point we have no interface 
configuration but a resolv.conf containing something, not sure if it's dynamic 
or static but better keep it)
 4) Grep /etc/network/interfaces for "inet dhcp" (non-commented) => if any => 
exit (it's already dynamic, managed by dhclient, so no need to be appended)
 5) Grep /etc/network/interfaces for dns- entries (non-commented) => if any => 
exit (resolvconf will use them, so no need to be appended)
 6) At this point, only configured interfaces in /etc/network/interfaces 
without dns-* fields and not using DHCP should remain => append (usual case of 
system installed with DHCP and manually altered afterwards, we need to keep 
these)


Is there any case that's not covered by the above checks or something you think 
should be handled differently?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/923685

Title:
  New resolver package overwrites manually created resolv.conf on server

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/923685/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to