Skip to content

Commit

Permalink
Move "User-settable rc.conf variables and their default values"
Browse files Browse the repository at this point in the history
section above the inclusion of rc.subr, and express the default
assignments more succinctly (from Todd Vierling). Remove Jonathan
de Boyne Pollard's dnscache-showctl and tinydns-showctl, since they
don't apply to services run with these rc.d scripts. Bump version.
  • Loading branch information
schmonz committed Dec 29, 2004
1 parent c72768b commit debb9e3
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 86 deletions.
5 changes: 1 addition & 4 deletions net/djbdns-run/DESCR
@@ -1,5 +1,2 @@
This package creates all the needed basic config files to run djbdns
services, and provides NetBSD-style rc.d scripts. It also includes
Jonathan de Boyne Pollard's dnscache-showctl and tinydns-showctl,
useful if you run services configured with dnscache-conf(8) or
tinydns-conf(8).
services, and provides NetBSD-style rc.d scripts.
11 changes: 2 additions & 9 deletions net/djbdns-run/Makefile
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.4 2004/12/28 02:47:46 reed Exp $
# $NetBSD: Makefile,v 1.5 2004/12/29 16:35:41 schmonz Exp $
#

DISTNAME= djbdns-run-20040902
PKGREVISION= 1
DISTNAME= djbdns-run-20041229
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down Expand Up @@ -54,14 +53,8 @@ PKG_SYSCONFDIR.djbdns-run!= \
do-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/README.pkgsrc \
> ${WRKDIR}/README.pkgsrc
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/dnscache-showctl.sh \
> ${WRKDIR}/dnscache-showctl
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/tinydns-showctl.sh \
> ${WRKDIR}/tinydns-showctl

do-install:
${INSTALL_SCRIPT} ${WRKDIR}/dnscache-showctl ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKDIR}/tinydns-showctl ${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/README.pkgsrc ${PREFIX}/share/doc/djbdns-run

.include "../../mk/bsd.pkg.mk"
4 changes: 1 addition & 3 deletions net/djbdns-run/PLIST
@@ -1,5 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2004/09/01 20:13:04 schmonz Exp $
bin/dnscache-showctl
bin/tinydns-showctl
@comment $NetBSD: PLIST,v 1.2 2004/12/29 16:35:41 schmonz Exp $
share/doc/djbdns-run/README.pkgsrc
@dirrm share/doc/djbdns-run
10 changes: 0 additions & 10 deletions net/djbdns-run/files/README.pkgsrc
Expand Up @@ -9,13 +9,3 @@ the package's maintainer:

If you need to ask for help on the dns list, please mention that
you're using the djbdns-run package from pkgsrc.

Jonathan de Boyne Pollard's dnscache-showctl and tinydns-showctl
scripts are included. When posting to the dns list, it's normally
a good idea to include the output of those commands. However, those
scripts expect services configured with dnscache-conf(8) and
tinydns-conf(8).

This package configures them in a much different way, in order to
run nicely from rc.d. Pollard's scripts are only useful, therefore,
if you've configured additional djbdns services in the standard way.
15 changes: 8 additions & 7 deletions net/djbdns-run/files/axfrdns.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: axfrdns.sh,v 1.2 2004/09/02 08:23:02 schmonz Exp $
# $NetBSD: axfrdns.sh,v 1.3 2004/12/29 16:35:41 schmonz Exp $
#
# @PKGNAME@ script to control axfrdns (DNS zone-transfer and TCP service)
#
Expand All @@ -9,11 +9,17 @@
# REQUIRE: SERVERS tinydns
# BEFORE: DAEMON

name="axfrdns"

# User-settable rc.conf variables and their default values:
axfrdns_tcpflags=${axfrdns_tcpflags-"-vDRHl0"}
axfrdns_datalimit=${axfrdns_datalimit-"300000"}
axfrdns_logcmd=${axfrdns_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi

name="axfrdns"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/axfrdns/tcp.cdb"
command="@LOCALBASE@/bin/tcpserver"
Expand All @@ -22,11 +28,6 @@ start_precmd="axfrdns_precmd"
extra_commands="cdb"
cdb_cmd="axfrdns_cdb"

# User-settable rc.conf variables and their default values:
axfrdns_tcpflags=${axfrdns_tcpflags-"-vDRHl0"}
axfrdns_datalimit=${axfrdns_datalimit-"300000"}
axfrdns_logcmd=${axfrdns_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

axfrdns_precmd()
{
command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid axfrdns @LOCALBASE@/bin/softlimit -d ${axfrdns_datalimit} @LOCALBASE@/bin/argv0 @LOCALBASE@/bin/tcpserver ${name} ${axfrdns_tcpflags} -x @PKG_SYSCONFDIR@/axfrdns/tcp.cdb -- ${tinydns_ip} 53 @LOCALBASE@/bin/axfrdns </dev/null 2>&1 | ${axfrdns_logcmd}"
Expand Down
20 changes: 0 additions & 20 deletions net/djbdns-run/files/dnscache-showctl.sh

This file was deleted.

19 changes: 10 additions & 9 deletions net/djbdns-run/files/dnscache.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: dnscache.sh,v 1.2 2004/09/02 08:23:02 schmonz Exp $
# $NetBSD: dnscache.sh,v 1.3 2004/12/29 16:35:41 schmonz Exp $
#
# @PKGNAME@ script to control dnscache (caching DNS resolver)
#
Expand All @@ -9,24 +9,25 @@
# REQUIRE: SERVERS
# BEFORE: DAEMON

name="dnscache"

# User-settable rc.conf variables and their default values:
dnscache_ip=${dnscache_ip-"127.0.0.1"}
dnscache_ipsend=${dnscache_ipsend-"0.0.0.0"}
dnscache_size=${dnscache_size-"1000000"}
dnscache_datalimit=${dnscache_datalimit-"3000000"}
dnscache_logcmd=${dnscache_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi

name="dnscache"
rcvar=${name}
required_dirs="@PKG_SYSCONFDIR@/dnscache/ip @PKG_SYSCONFDIR@/dnscache/servers"
required_files="@PKG_SYSCONFDIR@/dnscache/servers/@"
command="@LOCALBASE@/bin/${name}"
start_precmd="dnscache_precmd"

# User-settable rc.conf variables and their default values:
dnscache_ip=${dnscache_ip-"127.0.0.1"}
dnscache_ipsend=${dnscache_ipsend-"0.0.0.0"}
dnscache_size=${dnscache_size-"1000000"}
dnscache_datalimit=${dnscache_datalimit-"3000000"}
dnscache_logcmd=${dnscache_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

dnscache_precmd()
{
command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/dnscache IP=${dnscache_ip} IPSEND=${dnscache_ipsend} CACHESIZE=${dnscache_size} @LOCALBASE@/bin/envuidgid dnscache @LOCALBASE@/bin/softlimit -o250 -d ${dnscache_datalimit} @LOCALBASE@/bin/dnscache </dev/random 2>&1 | ${dnscache_logcmd}"
Expand Down
17 changes: 0 additions & 17 deletions net/djbdns-run/files/tinydns-showctl.sh

This file was deleted.

15 changes: 8 additions & 7 deletions net/djbdns-run/files/tinydns.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: tinydns.sh,v 1.2 2004/09/02 08:23:02 schmonz Exp $
# $NetBSD: tinydns.sh,v 1.3 2004/12/29 16:35:41 schmonz Exp $
#
# @PKGNAME@ script to control tinydns (authoritative DNS service)
#
Expand All @@ -9,23 +9,24 @@
# REQUIRE: SERVERS
# BEFORE: DAEMON

name="tinydns"

# User-settable rc.conf variables and their default values:
tinydns_ip=${tinydns_ip-"127.0.0.2"}
tinydns_datalimit=${tinydns_datalimit-"300000"}
tinydns_logcmd=${tinydns_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi

name="tinydns"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/tinydns/data.cdb"
command="@LOCALBASE@/bin/${name}"
start_precmd="tinydns_precmd"
extra_commands="cdb"
cdb_cmd="tinydns_cdb"

# User-settable rc.conf variables and their default values:
tinydns_ip=${tinydns_ip-"127.0.0.2"}
tinydns_datalimit=${tinydns_datalimit-"300000"}
tinydns_logcmd=${tinydns_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"}

tinydns_precmd()
{
command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid tinydns @LOCALBASE@/bin/softlimit -d ${tinydns_datalimit} @LOCALBASE@/bin/tinydns </dev/null 2>&1 | ${tinydns_logcmd}"
Expand Down

0 comments on commit debb9e3

Please sign in to comment.