I wrote: > The proper way for the admin to stop /etc/resolv.conf from > being updated by resolvconf is for him or her to remove the > symbolic link /etc/resolv.conf -> ../run/resolvconf/resolv.conf.
HeinMueck wrote: > what you describe as the proper way will not work at all >- take a look at /etc/network/if-up.d/000resolvconf. > It only checks if /sbin/resolvconf exists and if it is executable. > As it does not check for resolv.conf being a symlink it will > never stop if it is not. It checks if /sbin/resolvconf exists and is executable and if so it goes ahead and sends information to resolvconf, otherwise aborting. Resolvconf will process the information that has been sent to it and will generally write out a new /run/resolvconf/resolv.conf. However, if /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf then the latter file will not be accessible via the path /etc/resolv.conf and changes to it will therefore have no effect on the resolver. Thus, removing the symbolic link /etc/resolv.conf -> ../run/resolvconf/resolv.conf stops resolvconf from updating /etc/resolv.conf, just as I said. Furthermore, the mere presence of /sbin/resolvconf stops most other programs from updating resolv.conf directly because they check for the presence of /sbin/resolvconf and refrain from stomping on /etc/resolv.conf if it is present. (The exception to this rule is dhclient, which updates /etc/resolv.conf even if /sbin/resolvconf is present, if the aforementioned symlink is missing; but I consider that to be an undesirable exception: see bug #1385010.) So the correct way to prevent /etc/resolv.conf from being updated is to leave the resolvconf package installed and to remove the symbolic link /etc/resolv.conf -> ../run/resolvconf/resolv.conf. (And (in Ubuntu) to do something additional to stop dhclient from updating the file, e.g., removing the isc-dhcp-client package... but now we are getting off topic.) If this explanation isn't clear to you then it's possible that you are confused about how resolvconf works. In that case I suggest you read the resolvconf package README file at /usr/share/doc/resolvconf/README.gz. If you have a question about how correctly to configure your system(s) in order to obtain a certain desired behavior then please contact me directly. ** Changed in: resolvconf (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to resolvconf in Ubuntu. https://bugs.launchpad.net/bugs/1394081 Title: Add manual options for administrators Status in “resolvconf” package in Ubuntu: Incomplete Bug description: Currently - trusty LTS - there is no way to turn off the regeneration of /etc/resolv.conf that would survive a package upgrade. - you cannot remove resolvconf as it is needed by minimal - you cannot disable-upgrades as this flag is removed by reboots - if you disable the resolvconf job in upstart package upgrade will reset the disable-upgrade flags - if you hack the scripts - it will only last until the next upgrade There are two ways to ensure that admins willing to turn it off can do so: First solution: add a run=no to /etc/default/resolvconf and bail out if it is set. The second solution is more subtile. In /etc/network/if- up.d/000resolvconf you will find this line: [ -x /sbin/resolvconf ] || exit 0 While in /etc/dhcp/dhclient-enter-hooks.d/resolvconf it says if [ -x /sbin/resolvconf ] && [ -L /etc/resolv.conf ]; then Way more clever! So if you do not want to implement the default option, why not check if its a link all the way? So at least a conf gets not overwritten once the admin wrote his own. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1394081/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp