Date: Wed, 24 May 2006 16:11:05 -0500 From: "Zane C. B." <v.velox@vvelox.net> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/97852: [UPDATE] adds rc.subr support to dns/pdnsd Message-ID: <1148505065.2670@sasha.vulpes> Resent-Message-ID: <200605242120.k4OLKHPD083057@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1148505065.2670>