diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-08-28 17:44:28 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-08-28 17:44:28 +0000 |
commit | 750c3517cfeb774f43f7960b3ae25cb6f6ab3876 (patch) | |
tree | d65bc36d98a36639587d905558f0e05e94dbdb0a /security/cyrus-sasl2-saslauthd | |
parent | Convert from varargs.h to stdarg.h in order to fix build on -CURRENT. (diff) |
Use USE_RC_SUBR.
Notes
Notes:
svn path=/head/; revision=87918
Diffstat (limited to 'security/cyrus-sasl2-saslauthd')
-rw-r--r-- | security/cyrus-sasl2-saslauthd/Makefile | 9 | ||||
-rw-r--r-- | security/cyrus-sasl2-saslauthd/files/saslauthd.sh | 88 |
2 files changed, 32 insertions, 65 deletions
diff --git a/security/cyrus-sasl2-saslauthd/Makefile b/security/cyrus-sasl2-saslauthd/Makefile index 62a45044b68f..eae84c6999f2 100644 --- a/security/cyrus-sasl2-saslauthd/Makefile +++ b/security/cyrus-sasl2-saslauthd/Makefile @@ -7,7 +7,7 @@ PORTNAME= saslauthd PORTVERSION= 2.1.15 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%SUBDIR%/ \ ftp://ftp.westbend.net/pub/cyrus-mail/%SUBDIR%/ \ @@ -27,6 +27,8 @@ PATCHDIR= ${CYRUS_SASL2_DIR}/files INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/saslauthd DOCSDIR= ${PREFIX}/share/doc/cyrus-sasl2 +USE_RC_SUBR= YES + GNU_CONFIGURE= YES CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \ @@ -116,6 +118,9 @@ DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README PLIST_SUB= PREFIX=${PREFIX} \ DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} +RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ + RC_SUBR=${RC_SUBR} + do-build: @${RM} -f ${WRKSRC}/saslauthd/saslauthd.8 cd ${WRKSRC}/sasldb && ${MAKE} @@ -123,7 +128,7 @@ do-build: post-install: ${GZIP_CMD} ${MAN8PREFIX}/man/cat8/saslauthd.8 - @${SED} -e "s;%%PREFIX%%;${PREFIX};g" \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/saslauthd.sh > ${PREFIX}/etc/rc.d/saslauthd.sh @${CHMOD} 755 ${PREFIX}/etc/rc.d/saslauthd.sh ${MKDIR} -m 770 /var/state/saslauthd diff --git a/security/cyrus-sasl2-saslauthd/files/saslauthd.sh b/security/cyrus-sasl2-saslauthd/files/saslauthd.sh index 0d237663f885..6aabbd4ba935 100644 --- a/security/cyrus-sasl2-saslauthd/files/saslauthd.sh +++ b/security/cyrus-sasl2-saslauthd/files/saslauthd.sh @@ -1,74 +1,36 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.1 2003-06-01 04:24:15 ume Exp $ +# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.2 2003-08-28 17:44:28 ume Exp $ # -action=$1 - -PREFIX=%%PREFIX%% +# PROVIDE: saslauthd +# REQUIRE: DAEMON +# BEFORE: mail imap +# KEYWORD: FreeBSD shutdown +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move saslauthd.sh to /etc/rc.d/saslauthd -# Suck in the configuration variables. -if [ -z "${source_rc_confs_defined}" ]; then - if [ -r /etc/defaults/rc.conf ]; then - . /etc/defaults/rc.conf - source_rc_confs - elif [ -r /etc/rc.conf ]; then - . /etc/rc.conf - fi -fi +prefix=%%PREFIX%% -# The following sasl_saslauthd_* variables may be defined in rc.conf -# -# sasl_saslauthd_enable - Set to YES to enable saslauthd -# Default: YES +# Define these saslauthd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/saslauthd # -# sasl_saslauthd_program - Path to saslauthd program -# Default: ${PREFIX}/sbin/saslauthd +# DO NOT CHANGE THESE DEFAULT VALUES HERE # -# sasl_saslauthd_flags - Flags to saslauthd program -# Default: -a pam - -if [ -z "${sasl_saslauthd_enable}" ]; then - sasl_saslauthd_enable="YES" -fi - -if [ -z "${sasl_saslauthd_program}" ]; then - sasl_saslauthd_program="${PREFIX}/sbin/saslauthd" -fi - -if [ -z "${sasl_saslauthd_flags}" ]; then - sasl_saslauthd_flags="-a pam" -fi - -rc=0 - -case "${sasl_saslauthd_enable}" in - [Yy][Ee][Ss]) - case "${action}" in - - start) - if [ -x ${sasl_saslauthd_program} ] ; then - ${sasl_saslauthd_program} ${sasl_saslauthd_flags} \ - && echo -n " saslauthd" - fi - ;; +saslauthd_enable="YES" # Enable saslauthd +#saslauthd_program="${prefix}/sbin/saslauthd" # Location of saslauthd +saslauthd_flags="-a pam" # Flags to saslauthd program - stop) - if [ -r /var/state/saslauthd/saslauthd.pid ]; then - kill `cat /var/state/saslauthd/saslauthd.pid` && \ - echo -n " saslauthd" - fi - ;; +. %%RC_SUBR%% - *) - echo "usage: $0 {start|stop}" 1>&2 - rc=64 - ;; - esac - ;; - *) - rc=0 - ;; -esac +name="saslauthd" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +pidfile="/var/state/${name}/${name}.pid" -exit $rc +load_rc_config $name +run_rc_command "$1" |