aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2006-06-19 11:35:26 +0000
committerErwin Lansing <erwin@FreeBSD.org>2006-06-19 11:35:26 +0000
commit4040c988427b549aa4155f4f16a85e54da4ed5bd (patch)
tree10e9995d76ed9cadfec14675dba58dfe5449ea90
parent3b52b488982861be84601cf9395eed94bffee74a (diff)
downloadports-4040c988427b549aa4155f4f16a85e54da4ed5bd.tar.gz
ports-4040c988427b549aa4155f4f16a85e54da4ed5bd.zip
Notes
-rw-r--r--dns/pdnsd/Makefile10
-rw-r--r--dns/pdnsd/files/pdnsd.in16
-rw-r--r--dns/pdnsd/files/pdnsd.sh19
-rw-r--r--dns/pdnsd/pkg-plist1
4 files changed, 20 insertions, 26 deletions
diff --git a/dns/pdnsd/Makefile b/dns/pdnsd/Makefile
index ae97fd62b864..ae852e359442 100644
--- a/dns/pdnsd/Makefile
+++ b/dns/pdnsd/Makefile
@@ -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 @@ COMMENT= Caching (permanently, writes to disk on exit) DNS proxy-server
GNU_CONFIGURE= yes
USE_GMAKE= yes
+USE_RC_SUBR= pdnsd
CONFIGURE_ARGS= --with-cachedir=${PDNSDB} \
--disable-src-addr-disc
@@ -39,12 +40,9 @@ CONFIGURE_ARGS+= --enable-ipv6
.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}
diff --git a/dns/pdnsd/files/pdnsd.in b/dns/pdnsd/files/pdnsd.in
new file mode 100644
index 000000000000..27e70e0da0a1
--- /dev/null
+++ b/dns/pdnsd/files/pdnsd.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# PROVIDE: pdnsd
+# REQUIRE: netif
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="pdnsd"
+rcvar=${name}_enable
+command="%%PREFIX%%/sbin/pdnsd"
+pdnsd_flags="-d"
+required_files="%%PREFIX%%/etc/pdnsd.conf"
+load_rc_config $name
+
+run_rc_command "$1"
diff --git a/dns/pdnsd/files/pdnsd.sh b/dns/pdnsd/files/pdnsd.sh
deleted file mode 100644
index b5d6453eafd0..000000000000
--- a/dns/pdnsd/files/pdnsd.sh
+++ /dev/null
@@ -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 --git a/dns/pdnsd/pkg-plist b/dns/pdnsd/pkg-plist
index 38b887a5da77..b6965f55bad1 100644
--- a/dns/pdnsd/pkg-plist
+++ b/dns/pdnsd/pkg-plist
@@ -1,5 +1,4 @@
etc/pdnsd.conf.sample
-etc/rc.d/pdnsd.sh
sbin/pdnsd
sbin/pdnsd-ctl
%%PORTDOCS%%%%DOCSDIR%%/dl.html