Patchwork [meta-oe,V3,23/23] dhcp: add native systemd support for dhcp-relay

login
register
mail settings
Submitter Andreas Müller
Date Feb. 23, 2012, 12:10 p.m.
Message ID <1329999054-23112-24-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/21681/
State Accepted
Headers show

Comments

Andreas Müller - Feb. 23, 2012, 12:10 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |    8 +++++---
 .../dhcp/files/dhcrelay.service                    |   10 ++++++++++
 2 files changed, 15 insertions(+), 3 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 829ad3c..6d1e3df 100644
--- a/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend
+++ b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend
@@ -3,9 +3,11 @@  FILESEXTRAPATHS := "${THISDIR}/files"
 
 inherit systemd
 
-PRINC := "${@int(PRINC) + 2}"
+PRINC := "${@int(PRINC) + 3}"
 
-SYSTEMD_PACKAGES = "dhcp-server-systemd"
+SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd"
 SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
+SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.service"
 
-SRC_URI += "file://dhcpd.service"
+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