summaryrefslogtreecommitdiffstats
path: root/external/meta-updater/recipes-connectivity/networkd-dhcp-conf
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-updater/recipes-connectivity/networkd-dhcp-conf
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-updater/recipes-connectivity/networkd-dhcp-conf')
-rw-r--r--external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network5
-rw-r--r--external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb28
2 files changed, 33 insertions, 0 deletions
diff --git a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network
new file mode 100644
index 00000000..edb36788
--- /dev/null
+++ b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network
@@ -0,0 +1,5 @@
+[Match]
+@MATCH_DIRECTIVE@
+
+[Network]
+DHCP=yes
diff --git a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
new file mode 100644
index 00000000..0700ac6e
--- /dev/null
+++ b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
@@ -0,0 +1,28 @@
+SUMMARY = "systemd-networkd config to setup wired interface with dhcp"
+DESCRIPTION = "Provides automatic dhcp network configuration for wired \
+interfaces through systemd-networkd"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
+
+inherit allarch systemd
+
+RPROVIDES_${PN} = "virtual/network-configuration"
+
+SRC_URI_append = " file://20-wired-dhcp.network"
+PR = "r1"
+
+RDEPENDS_${PN} = "systemd"
+
+S = "${WORKDIR}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} = "${systemd_unitdir}/network/*"
+
+DEV_MATCH_DIRECTIVE ?= "Name=en*"
+
+do_install() {
+ install -d ${D}/${systemd_unitdir}/network
+ install -m 0644 ${WORKDIR}/20-wired-dhcp.network ${D}/${systemd_unitdir}/network
+ sed -i -e 's|@MATCH_DIRECTIVE@|${DEV_MATCH_DIRECTIVE}|g' ${D}${systemd_unitdir}/network/20-wired-dhcp.network
+}