diff options
author | pav <pav@FreeBSD.org> | 2005-11-18 03:13:22 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-11-18 03:13:22 +0800 |
commit | c53a781481480395756f16b9dccee69a7357ef15 (patch) | |
tree | abc16405875cdb4c6d374504422061cc73429488 /dns | |
parent | dace19d383722602de27c6ee5c50aa4ce0deca71 (diff) | |
download | freebsd-ports-gnome-c53a781481480395756f16b9dccee69a7357ef15.tar.gz freebsd-ports-gnome-c53a781481480395756f16b9dccee69a7357ef15.tar.zst freebsd-ports-gnome-c53a781481480395756f16b9dccee69a7357ef15.zip |
- Better use of USE_RC_SUBR infrastructure
Diffstat (limited to 'dns')
-rw-r--r-- | dns/dns_balance/Makefile | 4 | ||||
-rw-r--r-- | dns/dns_balance/files/dns_balance.sh.in (renamed from dns/dns_balance/files/dns_balance.sh) | 11 | ||||
-rw-r--r-- | dns/dns_balance/pkg-plist | 1 |
3 files changed, 7 insertions, 9 deletions
diff --git a/dns/dns_balance/Makefile b/dns/dns_balance/Makefile index 9a8d4e344d65..aeb1246e1481 100644 --- a/dns/dns_balance/Makefile +++ b/dns/dns_balance/Makefile @@ -15,7 +15,7 @@ MAINTAINER= ports@FreeBSD.org COMMENT= A dynamic load-balancing DNS server USE_RUBY= yes -USE_RC_SUBR= yes +USE_RC_SUBR= dns_balance.sh NO_BUILD= yes @@ -50,7 +50,6 @@ SUBST= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} post-patch: ${SED} ${SUBST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${WRKSRC}/dns_balance.rb > ${WRKSRC}/dns_balance - ${SED} ${SUBST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/dns_balance.sh > ${WRKSRC}/dns_balance.sh do-install: ${INSTALL_SCRIPT} ${WRKSRC}/dns_balance ${PREFIX}/sbin/ @@ -63,7 +62,6 @@ do-install: .for f in ${LIBS} ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/lib/${PORTNAME}/ .endfor - ${INSTALL_SCRIPT} ${WRKSRC}/dns_balance.sh ${PREFIX}/etc/rc.d/ .if !defined(NOPORTDOCS) ${MKDIR} ${EXAMPLESDIR} .for f in ${EXAMPLES_EXEC} diff --git a/dns/dns_balance/files/dns_balance.sh b/dns/dns_balance/files/dns_balance.sh.in index cda1b4dd7857..afce344f390e 100644 --- a/dns/dns_balance/files/dns_balance.sh +++ b/dns/dns_balance/files/dns_balance.sh.in @@ -6,17 +6,18 @@ # REQUIRE: DAEMON # KEYWORD: FreeBSD -dns_balance_enable="NO" -dns_balance_pidfile="/var/run/dns_balance.pid" -dns_balance_flags="-l /var/log/dns_balance.log -p ${dns_balance_pidfile}" - . %%RC_SUBR%% name=dns_balance rcvar=`set_rcvar` +load_rc_config ${name} + +: ${dns_balance_enable="NO"} +: ${dns_balance_pidfile="/var/run/dns_balance.pid"} +: ${dns_balance_flags="-l /var/log/dns_balance.log -p ${dns_balance_pidfile}"} + command="env ROOT=%%PREFIX%%/lib/dns_balance %%PREFIX%%/sbin/dns_balance" pidfile=${dns_balance_pidfile} -load_rc_config ${name} run_rc_command "$1" diff --git a/dns/dns_balance/pkg-plist b/dns/dns_balance/pkg-plist index 64b0f60033c1..317db70891e4 100644 --- a/dns/dns_balance/pkg-plist +++ b/dns/dns_balance/pkg-plist @@ -6,7 +6,6 @@ etc/dns_balance/addrdb.rb-dist etc/dns_balance/namespace.rb-dist @exec [ ! -f %B/namespace.rb ] && cp %B/%f %B/namespace.rb @dirrm etc/dns_balance -etc/rc.d/dns_balance.sh lib/dns_balance/as_search.rb lib/dns_balance/cache.rb lib/dns_balance/datatype.rb |