From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- .../networkd-dhcp-conf/files/20-wired-dhcp.network | 5 ++++ .../networkd-dhcp-conf/networkd-dhcp-conf.bb | 28 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/20-wired-dhcp.network create mode 100644 external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb (limited to 'external/meta-updater/recipes-connectivity/networkd-dhcp-conf') 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 +} -- cgit 1.2.3-korg