summaryrefslogtreecommitdiff
path: root/mail/drac
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-23 18:27:46 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-23 18:27:46 +0000
commitd58016fcb49b917f9c38c323f67565eba8bb82ee (patch)
treeeaa02d175342e29996ac50863495df7b14a1cac7 /mail/drac
parentadd p5-Telnet-Cisco 1.03 (diff)
Add dracd.sh startup script
Make the rpc.dracd daemon detach upon start Bump PORTREVISION PR: 29474 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=46734
Diffstat (limited to 'mail/drac')
-rw-r--r--mail/drac/Makefile11
-rw-r--r--mail/drac/files/dracd.sh20
-rw-r--r--mail/drac/files/patch-aa9
-rw-r--r--mail/drac/pkg-plist1
4 files changed, 36 insertions, 5 deletions
diff --git a/mail/drac/Makefile b/mail/drac/Makefile
index a5da29032396..f380f2c9e48e 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 000000000000..902ccdf7ae9c
--- /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 3887bad3723d..ad90fdf1290b 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 20661fba7750..1cd9e2de7a22 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