From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Feb 13 06:10:24 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D68016A4CE for ; Fri, 13 Feb 2004 06:10:24 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73AFC43D1D for ; Fri, 13 Feb 2004 06:10:24 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1DEANbv097423 for ; Fri, 13 Feb 2004 06:10:23 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1DEANA6097422; Fri, 13 Feb 2004 06:10:23 -0800 (PST) (envelope-from gnats) Date: Fri, 13 Feb 2004 06:10:23 -0800 (PST) Message-Id: <200402131410.i1DEANA6097422@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: "Ralf van der Enden" Subject: Re: ports/62344: powerdns doesn't have a startscript X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ralf van der Enden List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 14:10:24 -0000 The following reply was made to PR ports/62344; it has been noted by GNATS. From: "Ralf van der Enden" To: , Cc: Subject: Re: ports/62344: powerdns doesn't have a startscript Date: Fri, 13 Feb 2004 15:00:40 +0100 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 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