/sbin/resolvconf shouldn't abort when /etc/resolv.conf is not a symlink
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
resolvconf (Ubuntu) |
Fix Released
|
Medium
|
Stéphane Graber | ||
Quantal |
Fix Released
|
Medium
|
Stéphane Graber |
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:/
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
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
Changed in resolvconf (Ubuntu Quantal): | |
status: | Triaged → In Progress |
Changed in resolvconf (Ubuntu Quantal): | |
status: | In Progress → Fix Committed |
Makes sense to me. I don't think this warrants fixing in precise via SRU, but at least for quantal and forward we ought to drop the delta if it's no longer needed.