summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc14
-rw-r--r--meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb2
-rw-r--r--meta-oe/recipes-connectivity/dnsmasq/files/dnsmasq.service13
3 files changed, 27 insertions, 2 deletions
diff --git a/meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc b/meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc
index d6f3a54c3..ef99f489c 100644
--- a/meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc
+++ b/meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc
@@ -9,9 +9,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
9#at least versions 2.15 and prior are moved to the archive folder on the server 9#at least versions 2.15 and prior are moved to the archive folder on the server
10SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \ 10SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
11 file://init \ 11 file://init \
12 file://dnsmasq.conf" 12 file://dnsmasq.conf \
13 file://dnsmasq.service \
14"
13 15
14inherit update-rc.d 16inherit update-rc.d systemd
15 17
16INITSCRIPT_NAME = "dnsmasq" 18INITSCRIPT_NAME = "dnsmasq"
17INITSCRIPT_PARAMS = "defaults" 19INITSCRIPT_PARAMS = "defaults"
@@ -24,6 +26,14 @@ do_install () {
24 install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d 26 install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d
25 install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ 27 install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/
26 install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq 28 install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq
29
30 install -d ${D}${systemd_unitdir}/system
31 install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system
27} 32}
28 33
29CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf" 34CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf"
35
36RPROVIDES_${PN} += "${PN}-systemd"
37RREPLACES_${PN} += "${PN}-systemd"
38RCONFLICTS_${PN} += "${PN}-systemd"
39SYSTEMD_SERVICE_${PN} = "dnsmasq.service"
diff --git a/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb b/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb
index 5f877047f..ae37db739 100644
--- a/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb
+++ b/meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb
@@ -1,4 +1,6 @@
1require dnsmasq.inc 1require dnsmasq.inc
2 2
3PR = "r3"
4
3SRC_URI[dnsmasq-2.55.md5sum] = "b093d7c6bc7f97ae6fd35d048529232a" 5SRC_URI[dnsmasq-2.55.md5sum] = "b093d7c6bc7f97ae6fd35d048529232a"
4SRC_URI[dnsmasq-2.55.sha256sum] = "cf63ecf5977f00474cbda98376a9d8743500a82fd98e13f43d7037bce9f9f929" 6SRC_URI[dnsmasq-2.55.sha256sum] = "cf63ecf5977f00474cbda98376a9d8743500a82fd98e13f43d7037bce9f9f929"
diff --git a/meta-oe/recipes-connectivity/dnsmasq/files/dnsmasq.service b/meta-oe/recipes-connectivity/dnsmasq/files/dnsmasq.service
new file mode 100644
index 000000000..549e15e2b
--- /dev/null
+++ b/meta-oe/recipes-connectivity/dnsmasq/files/dnsmasq.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=DNS forwarder and DHCP server
3After=network.target
4
5[Service]
6Type=forking
7PIDFile=/run/dnsmasq.pid
8ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid
9ExecReload=/bin/kill -HUP $(/bin/cat /run/dnsmasq.pid)
10
11[Install]
12WantedBy=multi-user.target
13