From: Stefan Eichenberger Date: Thu, 29 May 2025 13:55:36 +0000 (-0300) Subject: connman: Set connman resolv.conf as fallback when using systemd-resolved X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bea9ea64820a86c4d01671087b706beca1ccdf26;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git connman: Set connman resolv.conf as fallback when using systemd-resolved Commit bec0cfc9b215 ("connman: Set dns-backend automatically") introduced support for using systemd-resolved as the DNS backend. However, connman's resolv.conf was assigned a higher update-alternatives priority. This caused connman's configuration to override systemd-resolved, resulting in a broken DNS setup. /etc/resolv.conf -> /etc/resolv-conf.connman This commit corrects the issue by lowering the priority for connman's resolv.conf when systemd-resolved is enabled, ensuring it acts as a fallback. The higher priority is now only applied when systemd-resolved is not used. Fixes: bec0cfc9b215 ("connman: Set dns-backend automatically") Signed-off-by: Stefan Eichenberger Signed-off-by: Hiago De Franco Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index 02c5be929e0..1b0fbe438c7 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -92,7 +92,7 @@ SYSTEMD_SERVICE:${PN} = "connman.service" SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" -ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd-resolved','10','100',d)}" ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"