ports/97852: [UPDATE] adds rc.subr support to dns/pdnsd
Kövesdán Gábor
gabor.kovesdan at t-hosting.hu
Sun Jun 18 09:50:32 UTC 2006
The following reply was made to PR ports/97852; it has been noted by GNATS.
From: =?ISO-8859-1?Q?K=F6vesd=E1n_G=E1bor?= <gabor.kovesdan at t-hosting.hu>
To: bug-followup at FreeBSD.org, v.velox at vvelox.net
Cc:
Subject: Re: ports/97852: [UPDATE] adds rc.subr support to dns/pdnsd
Date: Sun, 18 Jun 2006 11:43:35 +0200
This is a multi-part message in MIME format.
--------------000305070306030807050108
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sorry for my maintainer timeout, I was very busy and completely forgot
this. Here's the fix attached.
Gabor Kovesdan
--------------000305070306030807050108
Content-Type: text/plain;
name="dns-pdnsd.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="dns-pdnsd.diff"
Index: Makefile
===================================================================
RCS file: /usr/cvs/ports/dns/pdnsd/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- Makefile 12 May 2006 14:58:35 -0000 1.16
+++ Makefile 18 Jun 2006 09:27:03 -0000
@@ -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
@@ -17,6 +17,7 @@
GNU_CONFIGURE= yes
USE_GMAKE= yes
+USE_RC_SUBR+= pdnsd
CONFIGURE_ARGS= --with-cachedir=${PDNSDB} \
--disable-src-addr-disc
@@ -39,12 +40,9 @@
.endif
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
.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${DOC_FILES:S@^@${DOCSRCDIR}/@} ${DOCSDIR}
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${DOC_FILES:S@^@${DOCSRCDIR}/@} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
Index: pkg-plist
===================================================================
RCS file: /usr/cvs/ports/dns/pdnsd/pkg-plist,v
retrieving revision 1.3
diff -u -r1.3 pkg-plist
--- pkg-plist 31 Oct 2005 01:17:37 -0000 1.3
+++ pkg-plist 18 Jun 2006 09:29:34 -0000
@@ -1,5 +1,4 @@
etc/pdnsd.conf.sample
-etc/rc.d/pdnsd.sh
sbin/pdnsd
sbin/pdnsd-ctl
%%PORTDOCS%%%%DOCSDIR%%/dl.html
Index: files/pdnsd.in
===================================================================
RCS file: files/pdnsd.in
diff -N files/pdnsd.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/pdnsd.in 18 Jun 2006 09:39:04 -0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: pdnsd
+# REQUIRE: netif
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="pdnsd"
+rcvars=`set_rcvar`
+start_cmd="pdnsd_start"
+stop_cmd="pdnsd_stop"
+
+load_rc_config $name
+
+
+pdnsd_start(){
+ if [ -x %%PREFIX%%/sbin/pdnsd -a -f %%PREFIX%%/etc/pdnsd.conf ]; then
+ %%PREFIX%%/sbin/pdnsd -d
+ fi
+ echo Starting pdnsd.
+}
+
+pdnsd_stop(){
+ killall pdnsd
+ echo Stopping pdnsd.
+}
+
+
+run_rc_command "$1"
Index: files/pdnsd.sh
===================================================================
RCS file: files/pdnsd.sh
diff -N files/pdnsd.sh
--- files/pdnsd.sh 28 Jan 2001 07:51:34 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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
--------------000305070306030807050108--
More information about the freebsd-ports-bugs
mailing list