If the "dnsmasq" package is not installed then purging the dnsmasq
package will remove /etc/init.d/dnsmasq and solve your problem.

Do not purge or remove the "dnsmasq-base" package. The dnsmasq-base
package includes the dnsmasq binary which is used by NetworkManager.

Of course, the question remains: why was /etc/init.d/dnsmasq registering
an address with resolvconf when the dnsmasq package was not installed?

Ahaaaa.

At the top of /etc/init.d/dnsmasq there is a "test - x /usr/sbin/dnsmasq
|| exit 0" which causes the initscript to exit if the dnsmasq binary is
not present. When a daemon is packaged in the standard way, the binary
is present if and only if the package is installed and a test like this
suffices to disable the initscript if and only if the package is not
installed.

But not in the case of the "dnsmasq" package. The binary is in dnsmasq-
base. So the initscript does not disable itself when the dnsmasq package
is removed.

This is a bug.

For reference, Debian policy §9.3.2 says the following.

«
These scripts should not fail obscurely when the configuration files remain but 
the package has been removed, as configuration files remain on the system after 
the package has been removed. Only when dpkg is executed with the --purge 
option will configuration files be removed. In particular, as the 
/etc/init.d/package script itself is usually a conffile, it will remain on the 
system if the package is removed but not purged. Therefore, you should include 
a test statement at the top of the script, like this:

     test -f program-executed-later-in-script || exit 0
»

I am quite surprised that this bug hasn't been noticed before.

Reading the initscript I see another bug: the script fails to look at
the return value of the "start" function. I will file a separate report
about that, since it is not the cause of your problem.

** Changed in: resolvconf (Ubuntu)
       Status: New => Confirmed

** Summary changed:

- After upgrading from 12.04 to 14.04, network manager puts 127.0.0.1 instead 
of 127.0.1.1 in resolv.conf
+ The dnsmasq initscript fails to disable itself when the dnsmasq package is 
removed

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

Title:
  The dnsmasq initscript fails to disable itself when the dnsmasq
  package is removed

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

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

Reply via email to