[Resolvconf-devel] Bug#773749: Resolvconf vs wicd

Vincent Lefevre vincent at vinc17.net
Wed Jan 14 14:08:06 UTC 2015


On 2015-01-14 14:14:22 +0100, Thomas Hood wrote:
> > The problem is actually a lack of consistency: only
> > /run/resolvconf/resolv.conf is modified *but* it is not used.
> 
> This is an allowed configuration (which is sometimes even useful).
> Resolvconf writes /run/resolvconf/resolv.conf and the administrator
> gets to decide whether /etc/resolv.conf should be a symbolic link to
> this or whether it should be a static file or a link to something
> else. Some people install resolvconf just so that its presence will
> stop other software from futzing with /etc/resolv.conf which those
> people want to be static or want to manage with a custom script.

OK, but this is a very atypical usage for users of wicd, whose goal
is to make things work without needing to be root. So what about an
option for /etc/default/resolvconf to force the link creation when
using dhclient?

Otherwise the user needs to modify
/etc/dhcp/dhclient-enter-hooks.d/resolvconf to get this behavior.

> When the resolvconf package is initially installed it optionally and
> by default creates the symlink at /etc/resolv.conf,

But the symlink got removed for some reason I ignore. I'm wondering
whether wicd was the cause (with the code related to the backup file).

> but after that the admin is free to do what he or she likes with
> /etc/resolv.conf and resolvconf won't interfere. Resolvconf will
> only print a warning message which can be disabled by setting
> REPORT_ABSENT_SYMLINK=yes. This is all intentional and in accordance
> with the letter and spirit of Debian policy.

Unfortunately this message is not reported back by wicd.

> > IMHO, there would be two possible correct behaviors concerning
> > the /etc/dhcp/dhclient-enter-hooks.d/resolvconf hook script:
> >
> > 1. The hook script assumes that resolvconf should be used, so that
> >   a) it should disable the default behavior;
> >   b) it should modify /run/resolvconf/resolv.conf;
> >   c) it should make sure that /etc/resolv.conf is a symlink to
> >      /etc/resolvconf/run/resolv.conf (e.g. by removing the old
> >      file if there is one and adding the symlink).
> >
> > Currently, the hook script does (a)[*] and (b), but not (c).
> 
> Doing (c) would violate the principle that software (other than
> configurators) should preserve configuration files.

But dhclient is (partly) a configurator. The change of the
resolv.conf configuration file is requested in dhclient.conf,
and by default dhclient modifies /etc/resolv.conf as requested.

> > I suppose that changing the line
> >
> > if [ -x /sbin/resolvconf ] ; then
> >
> > to
> >
> > if [ -x /sbin/resolvconf ] && \
> >    [ "$(readlink /etc/resolv.conf)" = /etc/resolvconf/run/resolv.conf ] ; then
> >
> > would be sufficient.
> 
> 
> In Ubuntu they made a change similar to the one you propose
> 
>      if [ -x /sbin/resolvconf ] && [ -L /etc/resolv.conf ]; then
> 
> but this has given rise to complaints too, e.g.,
> https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1385010.

OK, so different users expect different things.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the Resolvconf-devel mailing list