From: Joe MacDonald <Joe_MacDonald@mentor.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: Re: [meta-networking][PATCH] dnrd: Add new recipe
Date: Mon, 29 Dec 2014 15:05:28 -0500 [thread overview]
Message-ID: <20141229200527.GC4672@mentor.com> (raw)
In-Reply-To: <1418890161-30095-1-git-send-email-qianl.fnst@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 7717 bytes --]
Merged, thanks.
-J.
[[oe] [meta-networking][PATCH] dnrd: Add new recipe] On 14.12.18 (Thu 16:09) Qian Lei wrote:
> dnrd is a proxying nameserver. It forwards DNS queries to the appropriate
> nameserver, but can also act as the primary nameserver for a subnet behind
> a firewall. It also has features such as caching DNS requests, support for
> DNS servers, cache poisoning prevention, TCP support, etc.
>
> Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
> ---
> .../recipes-daemons/dnrd/dnrd/dnrd.conf.sample | 21 +++++
> .../recipes-daemons/dnrd/dnrd/dnrd.init | 94 ++++++++++++++++++++++
> .../recipes-daemons/dnrd/dnrd/dnrd.service | 12 +++
> .../recipes-daemons/dnrd/dnrd_2.20.3.bb | 39 +++++++++
> 4 files changed, 166 insertions(+)
> create mode 100644 meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample
> create mode 100644 meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init
> create mode 100644 meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service
> create mode 100644 meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
>
> 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 0000000..d9f6b3d
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample
> @@ -0,0 +1,21 @@
> +# options to dnrd
> +
> +# example: two default dns servers and dns servers for exampledomain.com. The
> +# latter are load balanced (-b)
> +#
> +#
> +
> +# DNRD_OPTS="
> +# -s XXX.XXX.XX.XXX
> +# -s XXX.XXX.XX.XXX
> +# -b
> +# -s XXX.XXX.XX.XXX:exampledomain.com
> +# -s XXX.XXX.XX.XXX:exampledomain.com"
> +
> +# example: dnrd user
> +#
> +
> +# DNRD_USER="user"
> +#
> +
> +
> 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 0000000..73289a9
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init
> @@ -0,0 +1,94 @@
> +#!/bin/sh
> +#
> +# Startup script for dnrd
> +#
> +# Copyright 2008, Rakesh Pandit <rakesh.pandit@gmail.com>
> +#
> +# This source is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +
> +# This source is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> +#
> +# chkconfig: - 85 15
> +# description: dnrd is a proxying nameserver. It forwards DNS queries to the
> +# appropriate nameserver, but can also act as the primary nameserver for
> +# a subnet behind a firewall. It also has features such as caching DNS
> +# requests, support for DNS servers, cache poisoning prevention, TCP
> +# support, etc..
> +
> +# processname: dnrd
> +# pidfile: /var/run/dnrd.pid
> +# config: /etc/dnrd/dnrd.conf
> +
> +# Provides: dnrd
> +# Required-Start:
> +# Should-Start:
> +# Required-Stop:
> +# Default-Stop: 0 1 2 6
> +# Short-Description: Start dnrd daemon
> +# Description: Domain Name Relay Daemon
> +# END INIT INFO
> +
> +exe=/usr/sbin/dnrd
> +pfile=/etc/passwd
> +
> +# Source function library.
> +. /etc/init.d/functions
> +
> +# Source conf file
> +. /etc/dnrd/dnrd.conf
> +
> +[ -x $exe ] || exit 1
> +[ -r "/etc/dnrd/dnrd.conf" ] || exit 1
> +if [ $DNRD_USER ]
> +then
> + grep "^${LOGIN}:" $pfile >/dev/null 2>&1
> + if [ $? -eq 0 ];then
> + echo "$DNRD_USER specified in /etc/dnrd/dnrd.conf does not exist!"
> + fi
> +else
> + echo "DNRD_USER not set at /etc/dnrd/dnrd.conf!"
> + exit 1
> +fi
> +
> +case "$1" in
> + start)
> + echo -n "Starting dnrd: "
> + daemon dnrd $DNRD_OPTS -u $DNRD_USER
> + echo
> + touch /var/lock/subsys/dnrd
> + ;;
> + stop)
> + echo -n "Shutting down dnrd: "
> + killproc dnrd
> + echo
> + rm -f /var/lock/subsys/dnrd
> + rm -f /var/run/dnrd.pid
> + ;;
> + status)
> + status dnrd
> + ;;
> + restart)
> + $0 stop
> + $0 start
> + ;;
> + reload)
> + echo -n "Reloading dnrd: "
> + killproc dnrd -HUP
> + echo
> + ;;
> + *)
> + echo "Usage: $0 {start|stop|restart|reload|status}"
> + exit 1
> +esac
> +
> +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 0000000..9c9fa66
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service
> @@ -0,0 +1,12 @@
> +[Unit]
> +Description=Domain Name Relay Daemon
> +After=network.target
> +
> +[Service]
> +Type=forking
> +PIDFile=/var/run/dnrd.pid
> +EnvironmentFile=/etc/dnrd/dnrd.conf
> +ExecStart=/usr/sbin/dnrd $DNRD_OPTS -u $DNRD_USER
> +
> +[Install]
> +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 0000000..85a58cc
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb
> @@ -0,0 +1,39 @@
> +SUMMARY = "A caching, forwarding DNS proxy server"
> +DESCRIPTION = "\
> +dnrd is a proxying nameserver. It forwards DNS queries to the appropriate \
> +nameserver, but can also act as the primary nameserver for a subnet behind \
> +a firewall. It also has features such as caching DNS requests, support for \
> +DNS servers, cache poisoning prevention, TCP support, etc.."
> +HOMEPAGE = "http://dnrd.sourceforge.net/"
> +SECTION = "System Environment/Daemons"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=0be67017f1c770313ad7b40e18d568f1"
> +
> +SRC_URI = "http://ncu.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz \
> + file://dnrd.service \
> + file://dnrd.conf.sample \
> + file://dnrd.init"
> +SRC_URI[md5sum] = "41c9b070aae8ed403fc8c2aac7ab157c"
> +SRC_URI[sha256sum] = "aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015"
> +
> +SYSTEMD_SERVICE_${PN} = "dnrd.service"
> +SYSTEMD_AUTO_ENABLE = "disable"
> +
> +inherit autotools
> +inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
> +
> +do_install() {
> + oe_runmake install DESTDIR=${D} INSTALL="install -p"
> +
> + sed -i -e 's:/etc/rc.d/init.d/functions:/etc/init.d/functions:g' \
> + ${WORKDIR}/dnrd.init
> + install -d -m 0755 ${D}${sysconfdir}/init.d
> + install -d -m 0755 ${D}${sysconfdir}/dnrd
> + install -p -m 0644 ${WORKDIR}/dnrd.conf.sample ${D}${sysconfdir}/dnrd/dnrd.conf
> + install -p -m 0755 ${WORKDIR}/dnrd.init ${D}${sysconfdir}/init.d/dnrd
> +
> + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> + install -d -m 0755 ${D}${systemd_unitdir}/system
> + install -m 644 ${WORKDIR}/dnrd.service ${D}${systemd_unitdir}/system
> + fi
> +}
> --
> 1.8.3.1
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 501 bytes --]
prev parent reply other threads:[~2014-12-29 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 8:09 [meta-networking][PATCH] dnrd: Add new recipe Qian Lei
2014-12-29 20:05 ` Joe MacDonald [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141229200527.GC4672@mentor.com \
--to=joe_macdonald@mentor.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.