diff options
Diffstat (limited to 'meta-networking/recipes-daemons/dnrd')
4 files changed, 166 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample new file mode 100644 index 000000000..ec0584193 --- /dev/null +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample | |||
@@ -0,0 +1,21 @@ | |||
1 | # options to dnrd | ||
2 | |||
3 | # example: two default dns servers and dns servers for exampledomain.com. The | ||
4 | # latter are load balanced (-b) | ||
5 | # | ||
6 | # | ||
7 | |||
8 | # DNRD_OPTS=" | ||
9 | # -s XXX.XXX.XX.XXX | ||
10 | # -s XXX.XXX.XX.XXX | ||
11 | # -b | ||
12 | # -s XXX.XXX.XX.XXX:exampledomain.com | ||
13 | # -s XXX.XXX.XX.XXX:exampledomain.com" | ||
14 | |||
15 | # example: dnrd user | ||
16 | # | ||
17 | |||
18 | # DNRD_USER="user" | ||
19 | # | ||
20 | |||
21 | |||
diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init new file mode 100644 index 000000000..2fe583fcf --- /dev/null +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init | |||
@@ -0,0 +1,94 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Startup script for dnrd | ||
4 | # | ||
5 | # Copyright 2008, Rakesh Pandit <rakesh.pandit@gmail.com> | ||
6 | # | ||
7 | # This source is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2, or (at your option) | ||
10 | # any later version. | ||
11 | |||
12 | # This source is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | |||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | # | ||
21 | # chkconfig: - 85 15 | ||
22 | # description: dnrd is a proxying nameserver. It forwards DNS queries to the | ||
23 | # appropriate nameserver, but can also act as the primary nameserver for | ||
24 | # a subnet behind a firewall. It also has features such as caching DNS | ||
25 | # requests, support for DNS servers, cache poisoning prevention, TCP | ||
26 | # support, etc.. | ||
27 | |||
28 | # processname: dnrd | ||
29 | # pidfile: /var/run/dnrd.pid | ||
30 | # config: /etc/dnrd/dnrd.conf | ||
31 | |||
32 | # Provides: dnrd | ||
33 | # Required-Start: | ||
34 | # Should-Start: | ||
35 | # Required-Stop: | ||
36 | # Default-Stop: 0 1 2 6 | ||
37 | # Short-Description: Start dnrd daemon | ||
38 | # Description: Domain Name Relay Daemon | ||
39 | # END INIT INFO | ||
40 | |||
41 | exe=/usr/sbin/dnrd | ||
42 | pfile=/etc/passwd | ||
43 | |||
44 | # Source function library. | ||
45 | . /etc/init.d/functions | ||
46 | |||
47 | # Source conf file | ||
48 | . /etc/dnrd/dnrd.conf | ||
49 | |||
50 | [ -x $exe ] || exit 1 | ||
51 | [ -r "/etc/dnrd/dnrd.conf" ] || exit 1 | ||
52 | if [ $DNRD_USER ] | ||
53 | then | ||
54 | grep "^${LOGIN}:" $pfile >/dev/null 2>&1 | ||
55 | if [ $? -eq 0 ];then | ||
56 | echo "$DNRD_USER specified in /etc/dnrd/dnrd.conf does not exist!" | ||
57 | fi | ||
58 | else | ||
59 | echo "DNRD_USER not set at /etc/dnrd/dnrd.conf!" | ||
60 | exit 1 | ||
61 | fi | ||
62 | |||
63 | case "$1" in | ||
64 | start) | ||
65 | echo -n "Starting dnrd: " | ||
66 | daemon dnrd $DNRD_OPTS -u $DNRD_USER | ||
67 | echo | ||
68 | touch /var/lock/subsys/dnrd | ||
69 | ;; | ||
70 | stop) | ||
71 | echo -n "Shutting down dnrd: " | ||
72 | killproc dnrd | ||
73 | echo | ||
74 | rm -f /var/lock/subsys/dnrd | ||
75 | rm -f /var/run/dnrd.pid | ||
76 | ;; | ||
77 | status) | ||
78 | status dnrd | ||
79 | ;; | ||
80 | restart) | ||
81 | $0 stop | ||
82 | $0 start | ||
83 | ;; | ||
84 | reload) | ||
85 | echo -n "Reloading dnrd: " | ||
86 | killproc dnrd -HUP | ||
87 | echo | ||
88 | ;; | ||
89 | *) | ||
90 | echo "Usage: $0 {start|stop|restart|reload|status}" | ||
91 | exit 1 | ||
92 | esac | ||
93 | |||
94 | exit 0 | ||
diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service new file mode 100644 index 000000000..9c9fa6639 --- /dev/null +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Domain Name Relay Daemon | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/var/run/dnrd.pid | ||
8 | EnvironmentFile=/etc/dnrd/dnrd.conf | ||
9 | ExecStart=/usr/sbin/dnrd $DNRD_OPTS -u $DNRD_USER | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb b/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb new file mode 100644 index 000000000..85a58cc3b --- /dev/null +++ b/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "A caching, forwarding DNS proxy server" | ||
2 | DESCRIPTION = "\ | ||
3 | dnrd is a proxying nameserver. It forwards DNS queries to the appropriate \ | ||
4 | nameserver, but can also act as the primary nameserver for a subnet behind \ | ||
5 | a firewall. It also has features such as caching DNS requests, support for \ | ||
6 | DNS servers, cache poisoning prevention, TCP support, etc.." | ||
7 | HOMEPAGE = "http://dnrd.sourceforge.net/" | ||
8 | SECTION = "System Environment/Daemons" | ||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=0be67017f1c770313ad7b40e18d568f1" | ||
11 | |||
12 | SRC_URI = "http://ncu.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz \ | ||
13 | file://dnrd.service \ | ||
14 | file://dnrd.conf.sample \ | ||
15 | file://dnrd.init" | ||
16 | SRC_URI[md5sum] = "41c9b070aae8ed403fc8c2aac7ab157c" | ||
17 | SRC_URI[sha256sum] = "aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015" | ||
18 | |||
19 | SYSTEMD_SERVICE_${PN} = "dnrd.service" | ||
20 | SYSTEMD_AUTO_ENABLE = "disable" | ||
21 | |||
22 | inherit autotools | ||
23 | inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} | ||
24 | |||
25 | do_install() { | ||
26 | oe_runmake install DESTDIR=${D} INSTALL="install -p" | ||
27 | |||
28 | sed -i -e 's:/etc/rc.d/init.d/functions:/etc/init.d/functions:g' \ | ||
29 | ${WORKDIR}/dnrd.init | ||
30 | install -d -m 0755 ${D}${sysconfdir}/init.d | ||
31 | install -d -m 0755 ${D}${sysconfdir}/dnrd | ||
32 | install -p -m 0644 ${WORKDIR}/dnrd.conf.sample ${D}${sysconfdir}/dnrd/dnrd.conf | ||
33 | install -p -m 0755 ${WORKDIR}/dnrd.init ${D}${sysconfdir}/init.d/dnrd | ||
34 | |||
35 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
36 | install -d -m 0755 ${D}${systemd_unitdir}/system | ||
37 | install -m 644 ${WORKDIR}/dnrd.service ${D}${systemd_unitdir}/system | ||
38 | fi | ||
39 | } | ||