Patchwork [meta-oe,meta-systemd] dnsmasq: add systemd service scripts for dnsmasq

login
register
mail settings
Submitter Sander van Grieken
Date Sept. 7, 2012, 10:46 a.m.
Message ID <1347014793-27837-1-git-send-email-sander@outrightsolutions.nl>
Download mbox | patch
Permalink /patch/36105/
State Superseded
Headers show

Comments

Sander van Grieken - Sept. 7, 2012, 10:46 a.m.
Signed-off-by: Sander van Grieken <sander@outrightsolutions.nl>
---
 .../dnsmasq/dnsmasq/dnsmasq.service                |   13 +++++++++++++
 .../dnsmasq/dnsmasq_2.55.bbappend                  |   10 ++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq/dnsmasq.service
 create mode 100644 meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bbappend

Patch

diff --git a/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq/dnsmasq.service b/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq/dnsmasq.service
new file mode 100644
index 0000000..c9c7f9d
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq/dnsmasq.service
@@ -0,0 +1,13 @@ 
+[Unit]
+Description=DNS forwarder and DHCP server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dnsmasq.pid
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid
+ExecReload=kill -HUP $(cat /run/dnsmasq.pid)
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bbappend b/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bbappend
new file mode 100644
index 0000000..0a9c77e
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bbappend
@@ -0,0 +1,10 @@ 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PRINC := "${@int(PRINC) + 1}"
+
+inherit systemd
+
+SRC_URI += "file://dnsmasq.service"
+
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "dnsmasq.service"