1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

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>
This commit is contained in:
Norikatsu Shigemura 2004-05-04 12:56:56 +00:00
parent 5855b8edfb
commit 3478a6476f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108366
3 changed files with 41 additions and 35 deletions

View File

@ -6,6 +6,12 @@ You should get into the habit of checking this file for changes each
time you update your ports collection, before attempting any port
upgrades.
20040504:
AFFECTS: users of mail/drac
The "drac_flags" rc.conf(5) variable has been renamed to "dracd_flags".
See the pkg-message or script for details.
20040501:
AFFECTS: users of www/apache13

View File

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

View File

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