[oe-commits] Otavio Salvador : dhcp: add system support to dhcp-server

git at git.openembedded.org git at git.openembedded.org
Mon Nov 7 16:22:51 UTC 2011


Module: meta-openembedded.git
Branch: master
Commit: 9292db41f1e1707e0c6864cedf95ce4d7b366e83
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=9292db41f1e1707e0c6864cedf95ce4d7b366e83

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Mon Nov  7 14:33:49 2011 +0000

dhcp: add system support to dhcp-server

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |   19 +++++++++++++++++++
 .../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 0000000..d47f1ce
--- /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 0000000..70beee9
--- /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





More information about the Openembedded-commits mailing list