From 9292db41f1e1707e0c6864cedf95ce4d7b366e83 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 7 Nov 2011 14:33:49 +0000 Subject: dhcp: add system support to dhcp-server Signed-off-by: Otavio Salvador Signed-off-by: Koen Kooi --- meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | 19 +++++++++++++++++++ meta-oe/recipes-connectivity/dhcp/files/dhcpd.service | 12 ++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcpd.service (limited to 'meta-oe/recipes-connectivity') 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 @@ +# look for files in the layer first +FILESEXTRAPATHS := "${THISDIR}/files" + +inherit systemd + +SYSTEMD_PACKAGES = "dhcp-server-systemd" +SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service" + +SRC_URI += "file://dhcpd.service" + +do_install_append() { + install -d ${D}${base_libdir}/systemd/system + install -m 644 ${WORKDIR}/dhcpd.service ${D}${base_libdir}/systemd/system +} + +PACKAGES =+ "dhcp-server-systemd" + +FILES_dhcp-server-systemd += "${base_libdir}/systemd" +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 @@ +[Unit] +Description=Dynamic Host Configuration Protocol (DHCP) +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/dhcpd.pid +EnvironmentFile=-/etc/default/dhcp-server +ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -q $INTERFACES + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf