diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2004-05-04 12:56:56 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2004-05-04 12:56:56 +0000 |
commit | 3478a6476feca92234131a705a65ee573c7c513d (patch) | |
tree | f8dee1fcf08c011b2ceef194596348084c8adf89 /mail/drac | |
parent | 5855b8edfb242d2dd9416602e5bd27b31c743622 (diff) | |
download | ports-3478a6476feca92234131a705a65ee573c7c513d.tar.gz ports-3478a6476feca92234131a705a65ee573c7c513d.zip |
Notes
Diffstat (limited to 'mail/drac')
-rw-r--r-- | mail/drac/Makefile | 20 | ||||
-rw-r--r-- | mail/drac/files/dracd.sh | 50 |
2 files changed, 35 insertions, 35 deletions
diff --git a/mail/drac/Makefile b/mail/drac/Makefile index 183e2000cbf5..cae35549c202 100644 --- a/mail/drac/Makefile +++ b/mail/drac/Makefile @@ -7,7 +7,7 @@ PORTNAME= drac PORTVERSION= 1.12 -#PORTREVISION= 1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.cc.umanitoba.ca/src/ \ http://atreides.freenix.no/~anders/ \ @@ -24,6 +24,8 @@ LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 NO_WRKSUBDIR= yes USE_REINPLACE= yes +USE_RC_SUBR= yes +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN3= dracauth.3 MAN1= rpc.dracd.1 @@ -37,9 +39,9 @@ pre-everything:: @${ECHO_MSG} "=============================================================" @${ECHO_MSG} "For databases compatible with other MTAs than sendmail, use:" @${ECHO_MSG} - @${ECHO_MSG} "WITH_POSTFIX=yes (Postfix)" - @${ECHO_MSG} "WITH_POSTFIX_DB3=yes (Postfix with DB3 database maps)" - @${ECHO_MSG} "WITH_EXIM=yes (Exim)" + @${ECHO_MSG} "WITH_POSTFIX=yes (Postfix)" + @${ECHO_MSG} "WITH_POSTFIX_DB3=yes (Postfix with DB3 database maps)" + @${ECHO_MSG} "WITH_EXIM=yes (Exim)" @${ECHO_MSG} @${ECHO_MSG} "Define WITH_FOREGROUND to make the rpc.dracd daemon stay in" @${ECHO_MSG} "foreground instead of detaching itself. This breaks the" @@ -57,7 +59,13 @@ do-install: @${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/ @${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1 .endif - @${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/dracd.sh startup file." - @${INSTALL_SCRIPT} ${FILESDIR}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh + +post-build: + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/dracd.sh > ${WRKSRC}/dracd.sh + +post-install: + @${INSTALL_SCRIPT} ${WRKSRC}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/mail/drac/files/dracd.sh b/mail/drac/files/dracd.sh index 0490ac2f9114..7bb1a3dcd895 100644 --- a/mail/drac/files/dracd.sh +++ b/mail/drac/files/dracd.sh @@ -1,34 +1,26 @@ #!/bin/sh +# $FreeBSD$ -if ! PREFIX=$(/bin/expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 64 -fi +# PROVIDE: dracd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown -if [ -r /etc/defaults/rc.conf ]; then - . /etc/defaults/rc.conf - source_rc_confs -elif [ -r /etc/rc.conf ]; then - . /etc/rc.conf -fi +# Define these dracd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/dracd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +dracd_enable="NO" +dracd_flags="" -case "$1" in -start) - case ${dracd_enable:-NO} in - [Yy][Ee][Ss]) - ${dracd_program:-${PREFIX}/sbin/rpc.dracd} ${drac_flags} && echo -n ' dracd' - ;; - esac - ;; -stop) - case ${dracd_enable:-NO} in - [Yy][Ee][Ss]) - /usr/bin/killall rpc.dracd >/dev/null 2>&1 && echo -n ' dracd' - esac - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac +. %%RC_SUBR%% -exit 0 +name="dracd" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/rpc.dracd" + +load_rc_config $name +run_rc_command "$1" |