]> 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)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 19 Mar 2021 08:03:25 +0000 (16:03 +0800)
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>
(cherry picked from commit 8c4981e740c0e630200dbc77c9e3dfd3e43b790b)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/recipes-core/systemd/systemd-conf/wired.network
meta/recipes-core/systemd/systemd-conf_246.9.bb

index dcf35345966855035ef03888f2bc976459d91d6c..06d00ea1baf046560374dc81f812cff68ee1a7ee 100644 (file)
@@ -1,6 +1,7 @@
 [Match]
 Name=en* eth*
 KernelCommandLine=!nfsroot
+KernelCommandLine=!ip
 
 [Network]
 DHCP=yes
index d9ec023bfdae9a1a5d595d5999789ab3dff39dc4..9b797a91f4ad874a784ecff2b416f4909b5aa70d 100644 (file)
@@ -23,9 +23,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}"