[Bug 1012355] Re: /sbin/resolvconf shouldn't abort when /etc/resolv.conf is not a symlink

Thomas Hood 1012355 at bugs.launchpad.net
Tue Jun 26 15:38:52 UTC 2012


Hi Stéphane.

It was once the case that NM relied on resolvconf's exit status to tell
it what it should do next, but in Precise the status was changed to 0,
so there is no way that NM can still be using the status to make
decisions.

    [ -L /etc/resolv.conf ] || { report_err "/etc/resolv.conf isn't a
symlink, not doing anything."; exit 0; }

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

Title:
  /sbin/resolvconf shouldn't abort when /etc/resolv.conf is not a
  symlink

Status in “resolvconf” package in Ubuntu:
  In Progress
Status in “resolvconf” source package in Quantal:
  In Progress

Bug description:
  In resolvconf up to at least 1.65ubuntu4 the /sbin/resolvconf program
  exits with status 0 if /etc/resolv.conf is not a symbolic link.  This
  behavior differs in Ubuntu compared with Debian.

      +[ -L /etc/resolv.conf ] || { report_err "/etc/resolv.conf isn't a
  symlink, not doing anything."; exit 0; }

  In the old days resolvconf exited at this point with status 1 which
  triggered NetworkManager to write /etc/resolv.conf directly.  This was
  not a great idea then (I wrote about this in
  https://bugs.launchpad.net/ubuntu/+source/network-
  manager/+bug/324233/comments/30) but at least it was a reason for
  exiting at this point.

  Now there is no reason for /sbin/resolvconf to exit at this point.
  Exiting here serves no purpose except perhaps to save a trivial number
  of cpu cycles.  It just prevents resolvconf from updating its database
  and running update scripts.  Even if the admin wants /etc/resolv.conf
  to be a static file, there still may be some point in running update
  scripts.  Imagine a case is where dnsmasq is running, listening on an
  external interface serving some special purpose, forwarding queries to
  another interface, while /etc/resolv.conf points statically somewhere
  else.

  There is no reason to prevent resolvconf from keeping its database up
  to date. Consider also the case where the admin decides later to
  restore the symlink to point to /run/resolvconf/resolv.conf.

  If there is a reason to prevent some specific update script from
  running in the case where /etc/resolv.conf is not a symlink, then
  *that* update script should exit early under those circumstances.
  /etc/resolvconf/update.d/libc, for example, already exits without
  running the update-libc.d/ scripts if /etc/resolv.conf is not a
  symlink to /run/resolvconf/resolv.conf.

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




More information about the foundations-bugs mailing list