diff options
Diffstat (limited to 'recipes-connectivity')
3 files changed, 34 insertions, 0 deletions
diff --git a/recipes-connectivity/connman/connman_%.bbappend b/recipes-connectivity/connman/connman_%.bbappend new file mode 100644 index 0000000..b3633cc --- /dev/null +++ b/recipes-connectivity/connman/connman_%.bbappend | |||
@@ -0,0 +1 @@ | |||
RPROVIDES_${PN} += "virtual/network-configuration" | |||
diff --git a/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network b/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network new file mode 100644 index 0000000..edb3678 --- /dev/null +++ b/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network | |||
@@ -0,0 +1,5 @@ | |||
1 | [Match] | ||
2 | @MATCH_DIRECTIVE@ | ||
3 | |||
4 | [Network] | ||
5 | DHCP=yes | ||
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 @@ | |||
1 | SUMMARY = "systemd-networkd config to setup wired interface with dhcp" | ||
2 | DESCRIPTION = "Provides automatic dhcp network configuration for wired \ | ||
3 | interfaces through systemd-networkd" | ||
4 | LICENSE = "MPL-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
6 | |||
7 | inherit systemd | ||
8 | |||
9 | RPROVIDES_${PN} = "virtual/network-configuration" | ||
10 | |||
11 | SRC_URI_append = " file://20-wired-dhcp.network" | ||
12 | PR = "r1" | ||
13 | |||
14 | RDEPENDS_${PN} = "systemd" | ||
15 | |||
16 | S = "${WORKDIR}" | ||
17 | |||
18 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
19 | |||
20 | FILES_${PN} = "${systemd_unitdir}/network/*" | ||
21 | |||
22 | DEV_MATCH_DIRECTIVE ?= "Name=en*" | ||
23 | |||
24 | do_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 | } | ||