systemd-conf: do not ask for DHCP if configured on kernel command line

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.

(From OE-Core rev: 8c4981e740c0e630200dbc77c9e3dfd3e43b790b)

Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Schmidt
2021-03-04 20:35:40 +01:00
committed by Richard Purdie
parent 0904a74e33
commit 78df4ab73e
2 changed files with 1 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
[Match]
Type=ether
KernelCommandLine=!nfsroot
KernelCommandLine=!ip
[Network]
DHCP=yes

View 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}"