pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/djbdns-run Catch up to qmail-run:
details: https://anonhg.NetBSD.org/pkgsrc/rev/d7040d11d678
branches: trunk
changeset: 366184:d7040d11d678
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Sat Aug 05 15:16:05 2017 +0000
description:
Catch up to qmail-run:
- Collapse redundant code for invoking service-specific rc.d scripts.
- Don't try to run a service's rc.d script if it isn't enabled in rc.conf.
- Prefix "nb" to procnames.
Bump version.
diffstat:
net/djbdns-run/Makefile | 4 ++--
net/djbdns-run/files/axfrdns.sh | 6 +++---
net/djbdns-run/files/djbdns.sh | 39 +++++++++++++++++++--------------------
net/djbdns-run/files/dnscache.sh | 5 +++--
net/djbdns-run/files/rbldns.sh | 5 +++--
net/djbdns-run/files/tinydns.sh | 5 +++--
6 files changed, 33 insertions(+), 31 deletions(-)
diffs (188 lines):
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/Makefile
--- a/net/djbdns-run/Makefile Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/Makefile Sat Aug 05 15:16:05 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.27 2017/06/23 15:39:44 schmonz Exp $
+# $NetBSD: Makefile,v 1.28 2017/08/05 15:16:05 schmonz Exp $
#
-DISTNAME= djbdns-run-20170623
+DISTNAME= djbdns-run-20170805
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/files/axfrdns.sh
--- a/net/djbdns-run/files/axfrdns.sh Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/files/axfrdns.sh Sat Aug 05 15:16:05 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: axfrdns.sh,v 1.8 2017/06/23 15:39:44 schmonz Exp $
+# $NetBSD: axfrdns.sh,v 1.9 2017/08/05 15:16:05 schmonz Exp $
#
# @PKGNAME@ script to control axfrdns (DNS zone-transfer and TCP service).
#
@@ -29,7 +29,7 @@
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/${name}/tcp.cdb"
command="${axfrdns_tcpserver}"
-procname=${name}
+procname=nb${name}
start_precmd="axfrdns_precmd"
extra_commands="cdb reload"
cdb_cmd="axfrdns_cdb"
@@ -47,7 +47,7 @@
ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip}
@PREFIX@/bin/envuidgid @DJBDNS_AXFR_USER@
@PREFIX@/bin/softlimit -d ${axfrdns_datalimit} ${axfrdns_pretcpserver}
-@PREFIX@/bin/argv0 ${axfrdns_tcpserver} ${name}
+@PREFIX@/bin/argv0 ${axfrdns_tcpserver} ${procname}
${axfrdns_tcpflags} -x @PKG_SYSCONFDIR@/${name}/tcp.cdb
-- ${tinydns_ip} ${axfrdns_tcpport}
@PREFIX@/bin/${name}
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/files/djbdns.sh
--- a/net/djbdns-run/files/djbdns.sh Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/files/djbdns.sh Sat Aug 05 15:16:05 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: djbdns.sh,v 1.1 2005/04/15 05:15:55 schmonz Exp $
+# $NetBSD: djbdns.sh,v 1.2 2017/08/05 15:16:05 schmonz Exp $
#
# @PKGNAME@ master script for administrators to control djbdns
# services.
@@ -22,32 +22,31 @@
#
forward_commands()
{
- # Backward compat with NetBSD <1.6:
- [ -z "$rc_arg" ] && rc_arg=$_arg
-
- for file in $COMMAND_LIST; do
- $rcd_dir/$file $rc_arg
- done
+ djbdnsrcd $COMMAND_LIST
}
reverse_commands()
{
+ REVCOMMAND_LIST=
+ for file in $COMMAND_LIST; do
+ REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
+ done
+
+ djbdnsrcd $REVCOMMAND_LIST
+}
+
+djbdnsrcd()
+{
# Backward compat with NetBSD <1.6:
[ -z "$rc_arg" ] && rc_arg=$_arg
- REVCOMMAND_LIST=
- for file in $COMMAND_LIST; do
- REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
- done
- for file in $REVCOMMAND_LIST; do
- $rcd_dir/$file $rc_arg
- done
-}
-
-djbdnsrcd()
-{
- for service in $@; do
- $rcd_dir/${service} $rc_arg
+ for service in "$@"; do
+ if [ -f /etc/rc.subr ]; then
+ load_rc_config $service
+ checkyesno $service && $rcd_dir/${service} $rc_arg
+ else
+ $rcd_dir/${service} $rc_arg
+ fi
done
}
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/files/dnscache.sh
--- a/net/djbdns-run/files/dnscache.sh Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/files/dnscache.sh Sat Aug 05 15:16:05 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dnscache.sh,v 1.9 2017/06/23 15:39:44 schmonz Exp $
+# $NetBSD: dnscache.sh,v 1.10 2017/08/05 15:16:05 schmonz Exp $
#
# @PKGNAME@ script to control dnscache (caching DNS resolver).
#
@@ -29,6 +29,7 @@
required_dirs="@PKG_SYSCONFDIR@/${name}/ip @PKG_SYSCONFDIR@/${name}/servers"
required_files="@PKG_SYSCONFDIR@/${name}/servers/@"
command="@PREFIX@/bin/${name}"
+procname=nb${name}
start_precmd="dnscache_precmd"
dnscache_precmd()
@@ -41,7 +42,7 @@
IPSEND=${dnscache_ipsend} CACHESIZE=${dnscache_size}
@PREFIX@/bin/envuidgid @DJBDNS_CACHE_USER@
@PREFIX@/bin/softlimit -o250 -d ${dnscache_datalimit}
-@PREFIX@/bin/${name}
+@PREFIX@/bin/argv0 @PREFIX@/bin/${name} ${procname}
</dev/urandom 2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @DJBDNS_LOG_USER@ ${dnscache_logcmd}"
command_args="&"
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/files/rbldns.sh
--- a/net/djbdns-run/files/rbldns.sh Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/files/rbldns.sh Sat Aug 05 15:16:05 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: rbldns.sh,v 1.6 2017/06/23 15:39:44 schmonz Exp $
+# $NetBSD: rbldns.sh,v 1.7 2017/08/05 15:16:05 schmonz Exp $
#
# @PKGNAME@ script to control rbldns (local RBL service).
#
@@ -27,6 +27,7 @@
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/${name}/data.cdb"
command="@PREFIX@/bin/${name}"
+procname=nb${name}
start_precmd="rbldns_precmd"
extra_commands="cdb reload"
cdb_cmd="rbldns_cdb"
@@ -41,7 +42,7 @@
ROOT=@PKG_SYSCONFDIR@/${name} IP=${rbldns_ip} BASE=${rbldns_base}
@PREFIX@/bin/envuidgid @DJBDNS_RBL_USER@
@PREFIX@/bin/softlimit -d ${rbldns_datalimit}
-@PREFIX@/bin/${name}
+@PREFIX@/bin/argv0 @PREFIX@/bin/${name} ${procname}
2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @DJBDNS_LOG_USER@ ${rbldns_logcmd}"
command_args="&"
diff -r b9a5c22e9345 -r d7040d11d678 net/djbdns-run/files/tinydns.sh
--- a/net/djbdns-run/files/tinydns.sh Sat Aug 05 11:06:29 2017 +0000
+++ b/net/djbdns-run/files/tinydns.sh Sat Aug 05 15:16:05 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: tinydns.sh,v 1.8 2017/06/23 15:39:44 schmonz Exp $
+# $NetBSD: tinydns.sh,v 1.9 2017/08/05 15:16:05 schmonz Exp $
#
# @PKGNAME@ script to control tinydns (authoritative DNS service).
#
@@ -26,6 +26,7 @@
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/${name}/data.cdb"
command="@PREFIX@/bin/${name}"
+procname=nb${name}
start_precmd="tinydns_precmd"
extra_commands="cdb reload"
cdb_cmd="tinydns_cdb"
@@ -40,7 +41,7 @@
ROOT=@PKG_SYSCONFDIR@/${name} IP=${tinydns_ip}
@PREFIX@/bin/envuidgid @DJBDNS_TINY_USER@
@PREFIX@/bin/softlimit -d ${tinydns_datalimit}
-@PREFIX@/bin/${name}
+@PREFIX@/bin/argv0 @PREFIX@/bin/${name} ${procname}
</dev/null 2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @DJBDNS_LOG_USER@ ${tinydns_logcmd}"
command_args="&"
Home |
Main Index |
Thread Index |
Old Index