Comment 5 for bug 1782275

Revision history for this message
Daniel Richard G. (skunk) wrote :

This issue is still present in Ubuntu focal.

Here is what I see that needs to happen:

systemd: The /etc/dhcp/dhclient-enter-hooks.d/resolved script should be renamed to something like 00resolved or aaa_resolved, so that other packages that install scripts into that directory will have their scripts override whatever definitions are in the "resolved" script. (It is notable that the avahi-autoipd package installs a file named "zzz_avahi-autoipd" into /etc/dhcp/dhclient-exit-hooks.d/, apparently so that it always runs last.)

systemd: The "resolved" script itself is obviously a modified version of the one shipped with resolvconf; a comment at the top still even names the original project. There is a conditional at the top that checks for the presence of /lib/systemd/systemd-resolved (exactly where the original checks for /sbin/resolvconf), but this check is pointless---the systemd-resolved file not only belongs to the same package as the script, the package in question is systemd, which for all intents and purposes cannot be removed. Instead, the check should be on whether systemd-resolved is enabled, e.g.

    if systemctl is-enabled systemd-resolved | fgrep -q enabled ; then

systemd: In general, the "resolved" script could use some cleanup, particularly on removing bits related to resolvconf that do not apply to systemd-resolved.

resolvconf: It may be worthwhile for this package to disable systemd-resolved upon installation (and re-enable it upon renewal), as that presumably would be the intent of anyone installing it.