Allow distros which include other network managers to disable the
auto DHCP setup of interfaces in systemd-networkd.

Signed-off-by: Jack Mitchell <m...@embed.me.uk>
---
 meta/recipes-core/systemd/systemd-conf_246.1.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd-conf_246.1.bb 
b/meta/recipes-core/systemd/systemd-conf_246.1.bb
index d9ec023bfd..944b56ff82 100644
--- a/meta/recipes-core/systemd/systemd-conf_246.1.bb
+++ b/meta/recipes-core/systemd/systemd-conf_246.1.bb
@@ -5,6 +5,9 @@ DefaultTimeoutStartSec setting."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
+PACKAGECONFIG ??= "dhcp-ethernet"
+PACKAGECONFIG[dhcp-ethernet] = ""
+
 SRC_URI = "\
     file://journald.conf \
     file://logind.conf \
@@ -17,7 +20,10 @@ do_install() {
        install -D -m0644 ${WORKDIR}/journald.conf 
${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf
        install -D -m0644 ${WORKDIR}/logind.conf 
${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf
        install -D -m0644 ${WORKDIR}/system.conf 
${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf
-       install -D -m0644 ${WORKDIR}/wired.network 
${D}${systemd_unitdir}/network/80-wired.network
+
+        if ${@bb.utils.contains('PACKAGECONFIG', 'dhcp-ethernet', 'true', 
'false', d)}; then
+               install -D -m0644 ${WORKDIR}/wired.network 
${D}${systemd_unitdir}/network/80-wired.network
+        fi
 }
 
 # Based on change from YP bug 8141, OE commit 
5196d7bacaef1076c361adaa2867be31759c1b52
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145192): 
https://lists.openembedded.org/g/openembedded-core/message/145192
Mute This Topic: https://lists.openembedded.org/mt/78681665/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to