summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb')
-rw-r--r--recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb28
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
new file mode 100644
index 0000000..1a515a2
--- /dev/null
+++ b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
@@ -0,0 +1,28 @@
1SUMMARY = "systemd-networkd config to setup wired interface with dhcp"
2DESCRIPTION = "Provides automatic dhcp network configuration for wired \
3interfaces through systemd-networkd"
4LICENSE = "MPL-2.0"
5LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
6
7inherit systemd
8
9RPROVIDES_${PN} = "virtual/network-configuration"
10
11SRC_URI_append = " file://20-wired-dhcp.network"
12PR = "r1"
13
14RDEPENDS_${PN} = "systemd"
15
16S = "${WORKDIR}"
17
18PACKAGE_ARCH = "${MACHINE_ARCH}"
19
20FILES_${PN} = "${systemd_unitdir}/network/*"
21
22DEV_MATCH_DIRECTIVE ?= "Name=en*"
23
24do_install() {
25 install -d ${D}/${systemd_unitdir}/network
26 install -m 0644 ${WORKDIR}/20-wired-dhcp.network ${D}/${systemd_unitdir}/network
27 sed -i -e 's|@MATCH_DIRECTIVE@|${DEV_MATCH_DIRECTIVE}|g' ${D}${systemd_unitdir}/network/20-wired-dhcp.network
28}