pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/djbdns-run



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Sat Aug  5 15:16:05 UTC 2017

Modified Files:
        pkgsrc/net/djbdns-run: Makefile
        pkgsrc/net/djbdns-run/files: axfrdns.sh djbdns.sh dnscache.sh rbldns.sh
            tinydns.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/net/djbdns-run/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/net/djbdns-run/files/axfrdns.sh \
    pkgsrc/net/djbdns-run/files/tinydns.sh
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/djbdns-run/files/djbdns.sh
cvs rdiff -u -r1.9 -r1.10 pkgsrc/net/djbdns-run/files/dnscache.sh
cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/djbdns-run/files/rbldns.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/djbdns-run/Makefile
diff -u pkgsrc/net/djbdns-run/Makefile:1.27 pkgsrc/net/djbdns-run/Makefile:1.28
--- pkgsrc/net/djbdns-run/Makefile:1.27 Fri Jun 23 15:39:44 2017
+++ pkgsrc/net/djbdns-run/Makefile      Sat Aug  5 15:16:05 2017
@@ -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

Index: pkgsrc/net/djbdns-run/files/axfrdns.sh
diff -u pkgsrc/net/djbdns-run/files/axfrdns.sh:1.8 pkgsrc/net/djbdns-run/files/axfrdns.sh:1.9
--- pkgsrc/net/djbdns-run/files/axfrdns.sh:1.8  Fri Jun 23 15:39:44 2017
+++ pkgsrc/net/djbdns-run/files/axfrdns.sh      Sat Aug  5 15:16:05 2017
@@ -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 @@ fi
 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 @@ axfrdns_precmd()
 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}
Index: pkgsrc/net/djbdns-run/files/tinydns.sh
diff -u pkgsrc/net/djbdns-run/files/tinydns.sh:1.8 pkgsrc/net/djbdns-run/files/tinydns.sh:1.9
--- pkgsrc/net/djbdns-run/files/tinydns.sh:1.8  Fri Jun 23 15:39:44 2017
+++ pkgsrc/net/djbdns-run/files/tinydns.sh      Sat Aug  5 15:16:05 2017
@@ -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 @@ fi
 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 @@ tinydns_precmd()
 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="&"

Index: pkgsrc/net/djbdns-run/files/djbdns.sh
diff -u pkgsrc/net/djbdns-run/files/djbdns.sh:1.1 pkgsrc/net/djbdns-run/files/djbdns.sh:1.2
--- pkgsrc/net/djbdns-run/files/djbdns.sh:1.1   Fri Apr 15 05:15:55 2005
+++ pkgsrc/net/djbdns-run/files/djbdns.sh       Sat Aug  5 15:16:05 2017
@@ -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 @@ rcd_dir=`@DIRNAME@ $0`
 #
 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()
 {
-       # 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 $REVCOMMAND_LIST
 }
 
 djbdnsrcd()
 {
-       for service in $@; do
-               $rcd_dir/${service} $rc_arg
+       # Backward compat with NetBSD <1.6:
+       [ -z "$rc_arg" ] && rc_arg=$_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
 }
 

Index: pkgsrc/net/djbdns-run/files/dnscache.sh
diff -u pkgsrc/net/djbdns-run/files/dnscache.sh:1.9 pkgsrc/net/djbdns-run/files/dnscache.sh:1.10
--- pkgsrc/net/djbdns-run/files/dnscache.sh:1.9 Fri Jun 23 15:39:44 2017
+++ pkgsrc/net/djbdns-run/files/dnscache.sh     Sat Aug  5 15:16:05 2017
@@ -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 @@ rcvar=${name}
 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 @@ ROOT=@PKG_SYSCONFDIR@/${name} IP=${dnsca
 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="&"

Index: pkgsrc/net/djbdns-run/files/rbldns.sh
diff -u pkgsrc/net/djbdns-run/files/rbldns.sh:1.6 pkgsrc/net/djbdns-run/files/rbldns.sh:1.7
--- pkgsrc/net/djbdns-run/files/rbldns.sh:1.6   Fri Jun 23 15:39:44 2017
+++ pkgsrc/net/djbdns-run/files/rbldns.sh       Sat Aug  5 15:16:05 2017
@@ -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 @@ fi
 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 @@ rbldns_precmd()
 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="&"



Home | Main Index | Thread Index | Old Index