Add dracd.sh startup script

Make the rpc.dracd daemon detach upon start
Bump PORTREVISION

PR:		29474
Submitted by:	maintainer
This commit is contained in:
David W. Chapman Jr. 2001-08-23 18:27:46 +00:00
parent ee15ec150f
commit d58016fcb4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46734
4 changed files with 36 additions and 5 deletions

View File

@ -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>

20
mail/drac/files/dracd.sh Normal file
View File

@ -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

View File

@ -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
@ -31,6 +31,9 @@
+DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
+.else
+DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C
+.endif
+.if defined(WITH_FOREGROUND)
+DEFS+= -DRPC_SVC_FG
+.endif
# Compiler flags
@ -49,7 +52,7 @@
-#RPCGENFLAGS = -C
+TSTLIBS = -L. -ldrac
+#RPCGENFLAGS =
+RPCGENFLAGS = -C
+RPCGENFLAGS = -C -I
# Man sections
MANLIB = 3

View File

@ -1,3 +1,4 @@
sbin/rpc.dracd
include/drac.h
lib/libdrac.a
etc/rc.d/dracd.sh.sample