From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 24 21:20:18 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org 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 0F30816A9BD for ; Wed, 24 May 2006 21:20:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BC8A43D49 for ; Wed, 24 May 2006 21:20:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4OLKHX4083058 for ; Wed, 24 May 2006 21:20:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4OLKHPD083057; Wed, 24 May 2006 21:20:17 GMT (envelope-from gnats) Resent-Date: Wed, 24 May 2006 21:20:17 GMT Resent-Message-Id: <200605242120.k4OLKHPD083057@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Zane C. B." Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA7C716ABCB for ; Wed, 24 May 2006 21:11:11 +0000 (UTC) (envelope-from v.velox@vvelox.net) Received: from mail07.powweb.com (mail07.powweb.com [66.152.97.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F82643D69 for ; Wed, 24 May 2006 21:11:11 +0000 (GMT) (envelope-from v.velox@vvelox.net) Received: from sasha.vulpes (ip-69-155-32-130.midwest-connections.com [69.155.32.130]) by mail07.powweb.com (Postfix) with ESMTP id 00DF214DA3D for ; Wed, 24 May 2006 14:11:10 -0700 (PDT) Message-Id: <1148505065.2670@sasha.vulpes> Date: Wed, 24 May 2006 16:11:05 -0500 From: "Zane C. B." To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.7 Cc: Subject: ports/97852: [UPDATE] adds rc.subr support to dns/pdnsd X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 21:20:25 -0000 >Number: 97852 >Category: ports >Synopsis: [UPDATE] adds rc.subr support to dns/pdnsd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed May 24 21:20:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Zane C. B. >Release: FreeBSD 6.1-STABLE i386 >Organization: >Environment: System: FreeBSD 6.1-STABLE #0: Sat May 20 01:11:37 CDT 2006 kitsune@sasha.vulpes:/usr/obj/usr/src/sys/sasha-1 >Description: This replaces the old rc.d script with a new rc.subr rc.d script. >How-To-Repeat: Try it with the patch and you will see no rc.subr script and with it you will. >Fix: --- pdnsd.diff begins here --- diff -ruN pdnsd.orig/Makefile pdnsd/Makefile --- pdnsd.orig/Makefile Tue May 23 15:57:31 2006 +++ pdnsd/Makefile Tue May 23 16:56:27 2006 @@ -7,7 +7,7 @@ PORTNAME= pdnsd PORTVERSION= 1.2.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns MASTER_SITES= http://www.phys.uu.nl/~rombouts/pdnsd/releases/ DISTNAME= ${PORTNAME}-${PORTVERSION}-par @@ -40,8 +40,8 @@ post-install: @${MKDIR} ${PREFIX}/etc/rc.d - @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/pdnsd.sh > ${PREFIX}/etc/rc.d/pdnsd.sh - @${CHMOD} 750 ${PREFIX}/etc/rc.d/pdnsd.sh + @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/pdnsd > ${PREFIX}/etc/rc.d/pdnsd + @${CHMOD} 755 ${PREFIX}/etc/rc.d/pdnsd .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${DOC_FILES:S@^@${DOCSRCDIR}/@} ${DOCSDIR} diff -ruN pdnsd.orig/files/pdnsd pdnsd/files/pdnsd --- pdnsd.orig/files/pdnsd Wed Dec 31 18:00:00 1969 +++ pdnsd/files/pdnsd Wed May 24 16:05:45 2006 @@ -0,0 +1,30 @@ +#!/bin/sh + +# PROVIDE: pdnsd +# REQUIRE: netif +# BEFORE: LOGIN + +. /etc/rc.subr + +name="pdnsd" +rcvars=`set_rcvar` +start_cmd="pdnsd_start" +stop_cmd="pdnsd_stop" + +load_rc_config $name + + +pdnsd_start(){ + if [ -x /usr/local/sbin/pdnsd -a -f /usr/local/etc/pdnsd.conf ]; then + /usr/local/sbin/pdnsd -d + fi + echo starting pdnsd +} + +pdnsd_stop(){ + killall pdnsd + echo stoping pdnsd +} + + +run_rc_command "$1" diff -ruN pdnsd.orig/files/pdnsd.sh pdnsd/files/pdnsd.sh --- pdnsd.orig/files/pdnsd.sh Tue May 23 15:57:31 2006 +++ pdnsd/files/pdnsd.sh Wed Dec 31 18:00:00 1969 @@ -1,19 +0,0 @@ -#!/bin/sh - -case $1 in -start) - if [ -x %%PREFIX%%/sbin/pdnsd -a -f %%PREFIX%%/etc/pdnsd.conf ]; then - %%PREFIX%%/sbin/pdnsd -d - echo -n ' pdnsd' - fi - ;; -stop) - killall pdnsd && echo -n ' pdnsd' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac - -exit 0 diff -ruN pdnsd.orig/pkg-message pdnsd/pkg-message --- pdnsd.orig/pkg-message Tue May 23 15:57:31 2006 +++ pdnsd/pkg-message Wed May 24 16:07:25 2006 @@ -1,3 +1,7 @@ You'll need to manually copy ${PREFIX}/etc/pdnsd.conf.sample to ${PREFIX}/etc/pdnsd.conf and modify it for your needs. + +To turn it on, you will need to put pdnsd_enable="YES" in +/etc/rc.conf. + diff -ruN pdnsd.orig/pkg-plist pdnsd/pkg-plist --- pdnsd.orig/pkg-plist Tue May 23 15:57:31 2006 +++ pdnsd/pkg-plist Tue May 23 16:56:42 2006 @@ -1,5 +1,5 @@ etc/pdnsd.conf.sample -etc/rc.d/pdnsd.sh +etc/rc.d/pdnsd sbin/pdnsd sbin/pdnsd-ctl %%PORTDOCS%%%%DOCSDIR%%/dl.html --- pdnsd.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: