diff options
-rw-r--r-- | meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | 19 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/dhcp/files/dhcpd.service | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend new file mode 100644 index 000000000..d47f1ce57 --- /dev/null +++ b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | |||
@@ -0,0 +1,19 @@ | |||
1 | # look for files in the layer first | ||
2 | FILESEXTRAPATHS := "${THISDIR}/files" | ||
3 | |||
4 | inherit systemd | ||
5 | |||
6 | SYSTEMD_PACKAGES = "dhcp-server-systemd" | ||
7 | SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service" | ||
8 | |||
9 | SRC_URI += "file://dhcpd.service" | ||
10 | |||
11 | do_install_append() { | ||
12 | install -d ${D}${base_libdir}/systemd/system | ||
13 | install -m 644 ${WORKDIR}/dhcpd.service ${D}${base_libdir}/systemd/system | ||
14 | } | ||
15 | |||
16 | PACKAGES =+ "dhcp-server-systemd" | ||
17 | |||
18 | FILES_dhcp-server-systemd += "${base_libdir}/systemd" | ||
19 | RDEPENDS_dhcp-server-systemd += "dhcp-server" | ||
diff --git a/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service b/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service new file mode 100644 index 000000000..70beee92e --- /dev/null +++ b/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Dynamic Host Configuration Protocol (DHCP) | ||
3 | After=syslog.target network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/var/run/dhcpd.pid | ||
8 | EnvironmentFile=-/etc/default/dhcp-server | ||
9 | ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -q $INTERFACES | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||