diff options
author | dwcjr <dwcjr@FreeBSD.org> | 2001-08-23 18:27:46 +0000 |
---|---|---|
committer | dwcjr <dwcjr@FreeBSD.org> | 2001-08-23 18:27:46 +0000 |
commit | 820a2955711205fc84c1f2e37491a41c48223421 (patch) | |
tree | 2185c7d7a5cbcd00d5dfb98d9b65782a4113f372 /mail/drac | |
parent | 9826b0e547d132acea1e2b7c4742646fb2479bb5 (diff) | |
download | FreeBSD-ports-820a2955711205fc84c1f2e37491a41c48223421.zip FreeBSD-ports-820a2955711205fc84c1f2e37491a41c48223421.tar.gz |
Add dracd.sh startup script
Make the rpc.dracd daemon detach upon start
Bump PORTREVISION
PR: 29474
Submitted by: maintainer
Diffstat (limited to 'mail/drac')
-rw-r--r-- | mail/drac/Makefile | 11 | ||||
-rw-r--r-- | mail/drac/files/dracd.sh | 20 | ||||
-rw-r--r-- | mail/drac/files/patch-aa | 9 | ||||
-rw-r--r-- | mail/drac/pkg-plist | 1 |
4 files changed, 36 insertions, 5 deletions
diff --git a/mail/drac/Makefile b/mail/drac/Makefile index a5da290..f380f2c 100644 --- a/mail/drac/Makefile +++ b/mail/drac/Makefile @@ -7,6 +7,7 @@ PORTNAME= drac PORTVERSION= 1.11 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.cc.umanitoba.ca/src/ \ http://www.freenix.no/~anders/ \ @@ -29,8 +30,10 @@ MAKE_ARGS+= -DWITH_TI_RPC post-patch: @${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m @${ECHO} "================================================================================" - @${ECHO} "Use make -DWITH_POSTFIX or -DWITH_EXIM with this port for databases compatible" - @${ECHO} "with those MTAs." + @${ECHO} "Define WITH_POSTFIX or WITH_EXIM for databases compatible with those MTAs." + @${ECHO} + @${ECHO} "Define WITH_FOREGROUND to make the rpc.dracd daemon stay in foreground instead" + @${ECHO} "of detaching itself. This breaks the startup script." @${ECHO} "================================================================================" do-install: @@ -41,5 +44,9 @@ do-install: @${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/ @${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1 .endif + @if [ ! -f ${PREFIX}/etc/rc.d/dracd.sh.sample ]; then \ + ${ECHO} "Installing ${PREFIX}/etc/rc.d/dracd.sh.sample startup file."; \ + ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh.sample; \ + fi .include <bsd.port.post.mk> diff --git a/mail/drac/files/dracd.sh b/mail/drac/files/dracd.sh new file mode 100644 index 0000000..902ccdf --- /dev/null +++ b/mail/drac/files/dracd.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + [ -x ${PREFIX}/sbin/rpc.dracd ] && ${PREFIX}/sbin/rpc.dracd && echo -n ' dracd' + ;; +stop) + killall rpc.dracd >/dev/null 2>&1 && echo -n ' dracd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/mail/drac/files/patch-aa b/mail/drac/files/patch-aa index 3887bad..ad90fdf 100644 --- a/mail/drac/files/patch-aa +++ b/mail/drac/files/patch-aa @@ -1,5 +1,5 @@ --- Makefile.orig Mon Nov 20 16:35:16 2000 -+++ Makefile Sun Apr 29 20:38:47 2001 ++++ Makefile Mon Aug 6 00:28:52 2001 @@ -5,9 +5,10 @@ # Paths @@ -14,7 +14,7 @@ # OS-Dependant settings -@@ -33,20 +34,32 @@ +@@ -33,20 +34,35 @@ # -DCIDR_KEY # keys in CIDR format # -DTERM_KD # keys and data nul-terminated @@ -32,6 +32,9 @@ +.else +DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C +.endif ++.if defined(WITH_FOREGROUND) ++DEFS+= -DRPC_SVC_FG ++.endif # Compiler flags CC = cc @@ -49,7 +52,7 @@ -#RPCGENFLAGS = -C +TSTLIBS = -L. -ldrac +#RPCGENFLAGS = -+RPCGENFLAGS = -C ++RPCGENFLAGS = -C -I # Man sections MANLIB = 3 diff --git a/mail/drac/pkg-plist b/mail/drac/pkg-plist index 20661fb..1cd9e2d 100644 --- a/mail/drac/pkg-plist +++ b/mail/drac/pkg-plist @@ -1,3 +1,4 @@ sbin/rpc.dracd include/drac.h lib/libdrac.a +etc/rc.d/dracd.sh.sample |