Patchwork [meta-oe,RFC,25/27] dhcp: add native support for dhcp-relay / remove unneeded systemd code

login
register
mail settings
Submitter Andreas Müller
Date Feb. 7, 2012, 3:12 p.m.
Message ID <1328627573-5217-26-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/20853/
State Rejected
Headers show

Comments

Andreas Müller - Feb. 7, 2012, 3:12 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |   16 +++++-----------
 .../dhcp/files/dhcrelay.service                    |   10 ++++++++++
 2 files changed, 15 insertions(+), 11 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service

Patch

diff --git a/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend
index d47f1ce..556dba1 100644
--- a/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend
+++ b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend
@@ -1,19 +1,13 @@ 
 # look for files in the layer first
 FILESEXTRAPATHS := "${THISDIR}/files"
 
+PRINC = "1"
+
 inherit systemd
 
 SYSTEMD_PACKAGES = "dhcp-server-systemd"
 SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
+SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.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"
+SRC_URI += "file://dhcpd.service \
+            file://dhcrelay.service"
diff --git a/meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service b/meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service
new file mode 100644
index 0000000..f68f468
--- /dev/null
+++ b/meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -0,0 +1,10 @@ 
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=syslog.target network.target
+
+[Service]
+EnvironmentFile=/etc/default/dhcp-relay
+ExecStart=/usr/sbin/dhcrelay -d $DHCRELAYARGS
+
+[Install]
+WantedBy=multi-user.target