diff options
author | nork <nork@FreeBSD.org> | 2004-05-04 12:56:56 +0000 |
---|---|---|
committer | nork <nork@FreeBSD.org> | 2004-05-04 12:56:56 +0000 |
commit | 5e80a56dcbc382249ca09afb7a7b3545ec682f8e (patch) | |
tree | bee94a4b00c3c73af81ecbd054d2796396868661 /mail/drac | |
parent | b12e2ed64ebba2dcd176298065fa66026838e66e (diff) | |
download | FreeBSD-ports-5e80a56dcbc382249ca09afb7a7b3545ec682f8e.zip FreeBSD-ports-5e80a56dcbc382249ca09afb7a7b3545ec682f8e.tar.gz |
o Minor text formatting changes when spitting out WITH_* tweaks;
use spaces, not tabs.
o rcNG-fy.
+ Rename rc.conf(5) variable "drac_flags" to "dracd_flags".
+ Display pkg-message after install, warning admins of the rc.conf(5)
variable name change.
o Bump PORTREVISION accordingly.
PR: ports/66234
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>
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 183e200..cae3554 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 0490ac2..7bb1a3d 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" |