]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd-conf: do not ask for DHCP if configured on kernel command line
authorStefan Schmidt <stefan.schmidt@huawei.com>
Thu, 4 Mar 2021 19:35:40 +0000 (20:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 6 Mar 2021 22:36:34 +0000 (22:36 +0000)
In cases where we configure the IP address and more on the kernel
command line with ip= we should not ask for DHCP with systemd-networkd
later on. We have such a setup with our runqemu script.

With this match in place we can also deploy this unit on qemu systems.

Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd-conf/wired.network
meta/recipes-core/systemd/systemd-conf_247.3.bb

index 09367edb103be4b897199c832a05f228bac70f33..e7b69970d67edece2be151a481920edc252c40bd 100644 (file)
@@ -1,6 +1,7 @@
 [Match]
 Type=ether
 KernelCommandLine=!nfsroot
+KernelCommandLine=!ip
 
 [Network]
 DHCP=yes
index 944b56ff82aa0a01c77c20fde832b8b94b4a27da..ea35e83f4f12bf519922868897d696edca0ca2f9 100644 (file)
@@ -29,9 +29,6 @@ do_install() {
 # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
 do_install_append_qemuall() {
        install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
-
-       # Do not install wired.network for qemu bsps
-       rm -rf ${D}${systemd_unitdir}/network
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"