It would be nice if powerdns would also install a initscript, at least I didn't find one after installation of 2.9.15 in /usr/local/etc/rc.d. Fix: Include the startupscript that comes with pdns.
Hi, On Wed, Feb 04, 2004 at 05:05:55AM -0800, Fridtjof Busse wrote: > > >Number: 62344 > >Category: ports > >Synopsis: powerdns doesn't have a startscript > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-ports-bugs Could you please review this PR ? http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/62344 -Kirill
State Changed From-To: open->feedback Asked for maintainer's review.
The following patch adds a startup script for powerdns. If the recursor exists it'll start it as well. diff -ruN powerdns/Makefile powerdns/Makefile --- powerdns/Makefile Wed Feb 4 06:19:56 2004 +++ powerdns/Makefile Fri Feb 13 12:54:14 2004 @@ -6,7 +6,7 @@ PORTNAME= powerdns PORTVERSION= 2.9.15 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns ipv6 MASTER_SITES= http://downloads.powerdns.com/releases/ DISTNAME= pdns-${PORTVERSION} @@ -27,6 +27,7 @@ DISTNAME="${DISTNAME}" \ POWERDNS_OPTIONS="${POWERDNS_OPTIONS}" MAN8= pdns_control.8 pdns_server.8 zone2sql.8 +STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/pdns.sh.sample # use user config if possible .if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) @@ -124,6 +125,10 @@ .for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql ${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/ .endfor +.endif +.if !exists(${STARTUP_SCRIPT}) + ${ECHO} "Installing ${STARTUP_SCRIPT} startup file." + ${INSTALL_SCRIPT} ${FILESDIR}/pdns.sh.sample ${STARTUP_SCRIPT} .endif .include <bsd.port.post.mk> diff -ruN powerdns/Makefile.inc powerdns/Makefile.inc --- powerdns/Makefile.inc Thu Feb 12 05:08:11 2004 +++ powerdns/Makefile.inc Thu Jan 1 01:00:00 1970 @@ -1 +0,0 @@ -WITH_POSTGRESQL_DRIVER=YES diff -ruN powerdns/files/pdns.sh.sample powerdns/files/pdns.sh.sample --- powerdns/files/pdns.sh.sample Thu Jan 1 01:00:00 1970 +++ powerdns/files/pdns.sh.sample Fri Feb 13 11:17:49 2004 @@ -0,0 +1,34 @@ +#!/bin/sh + +rc_file=${0##*/} + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then + echo "${rc_file}: Cannot determine PREFIX." >&2 + echo "Please use the complete pathname." >&2 + exit 64 +fi + +pdns=${PREFIX}/sbin/pdns_server +pdnscontrol=${PREFIX}/bin/pdns_control +pdnsrecursor=${PREFIX}/sbin/pdns_recursor +recursorpid=/var/run/pdns_recursor.pid + +# start +if [ "x$1" = "x" -o "x$1" = "xstart" ]; then + if [ -f $pdns ]; then + echo -n ' PowerDNS' + if [ -f $pdnsrecursor ]; then + $pdnsrecursor >/dev/null 2>&1 + fi + $pdns + fi + +# stop +elif [ "x$1" = "xstop" ]; then + if [ -f $pdnscontrol ]; then + $pdnscontrol quit + fi + if [ -r $recursorpid ]; then + kill `cat $recursorpid` >/dev/null + fi +fi
Hello freebsd-gnats-submit, The previous patch was sent from work so the email address was different then the one known to GNATS. Sorry about that. It can be commited to the ports tree. -- Best regards, Ralf mailto:tremere@cainites.net
State Changed From-To: feedback->closed Committed, thanks!