Conflict between resolvconf and systemd-resolved dhclient scripts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
resolvconf (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I am setting up an Ubuntu 18.04 (bionic) system with ifupdown instead of netplan, as the latter does not meet my needs. I am using resolvconf to update /etc/resolv.conf from DHCP, as in earlier releases.
Unfortunately, I am not seeing /etc/resolv.conf (actually a symlink to /run/resolvconf
I poked around the scripts in /etc, and believe I have found the problem.
When resolvconf is installed, the following two files are present:
/etc/
/etc/
Both of these scripts define the make_resolv_conf() shell function. What I am seeing is that dhclient runs these two scripts in the (alphabetical) order shown, and as the resolved script runs second, it overwrites the resolvconf version of the shell function with its own. As a result, dhclient does not invoke the appropriate update command for resolvconf, even though the hook script was installed correctly.
Normally, I would remove the package that is providing the "resolved" script, but this package is systemd, which cannot be removed. I am not sure which of the two packages (resolvconf or systemd) needs to make an accommodation for the other, but it is clear that the current approach does not work.
Given that it is a conffile, you can remove the one you do not need.
Why do you want to use resolvconf, instead of resolved? I was expecting for people to have /etc/resolv.conf to point at either /run/systemd/ resolve/ stub-resolv. conf or /run/systemd/ resolve/ resolv. conf (as needed) and have nameservers updated via that.