diff options
-rw-r--r-- | security/cyrus-sasl/Makefile | 5 | ||||
-rw-r--r-- | security/cyrus-sasl/files/pwcheck.sh | 58 | ||||
-rw-r--r-- | security/cyrus-sasl/files/saslauthd.sh | 74 |
3 files changed, 18 insertions, 119 deletions
diff --git a/security/cyrus-sasl/Makefile b/security/cyrus-sasl/Makefile index 89863bc363f8..d4c1a4443426 100644 --- a/security/cyrus-sasl/Makefile +++ b/security/cyrus-sasl/Makefile @@ -7,7 +7,7 @@ PORTNAME= cyrus-sasl PORTVERSION= 1.5.28 -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%/ \ @@ -47,6 +47,8 @@ MAN3= sasl.3 sasl_authorize_t.3 sasl_callbacks.3 sasl_checkpass.3 \ sasl_setprop.3 sasl_usererr.3 MAN8= sasldblistusers.8 saslpasswd.8 saslauthd1.8 +USE_RC_SUBR= YES + USE_AUTOMAKE_VER=14 USE_LIBTOOL= YES AUTOMAKE_ARGS= --add-missing --include-deps @@ -182,6 +184,7 @@ pre-fetch: .endif RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ + RC_SUBR=${RC_SUBR} \ PWCHECK=${PWCHECK} \ ENABLE_PWCHECK=${ENABLE_PWCHECK} \ ENABLE_SASLAUTHD=${ENABLE_SASLAUTHD} \ diff --git a/security/cyrus-sasl/files/pwcheck.sh b/security/cyrus-sasl/files/pwcheck.sh index 7dbfde8711d7..8504b02e3016 100644 --- a/security/cyrus-sasl/files/pwcheck.sh +++ b/security/cyrus-sasl/files/pwcheck.sh @@ -25,56 +25,12 @@ cyrus_pwcheck_enable="%%ENABLE_PWCHECK%%" # Enable pwcheck daemon cyrus_pwcheck_program="${prefix}/sbin/%%PWCHECK%%" # pwcheck program to use # (pwcheck/pwcheck_pam) -if [ -f /etc/rc.subr ]; then - . /etc/rc.subr +. %%RC_SUBR%% - name="cyrus_pwcheck" - rcvar=`set_rcvar` - command=${prefix}/sbin/%%PWCHECK%% - pidfile="/var/run/pwcheck.pid" +name="cyrus_pwcheck" +rcvar=`set_rcvar` +command=${prefix}/sbin/%%PWCHECK%% +pidfile="/var/run/pwcheck.pid" - load_rc_config $name - run_rc_command "$1" -else - # 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 - - rc=0 - - case "${cyrus_pwcheck_enable}" in - [Yy][Ee][Ss]) - case "${1}" in - - start) - if [ -x ${cyrus_pwcheck_program} ] ; then - ${cyrus_pwcheck_program} && echo -n " cyrus_pwcheck" - fi - ;; - - stop) - if [ -r /var/run/pwcheck.pid ]; then - kill `cat /var/run/pwcheck.pid` && echo -n " cyrus_pwcheck" - rm /var/run/pwcheck.pid - fi - ;; - - *) - echo "usage: $0 {start|stop}" 1>&2 - rc=64 - ;; - esac - ;; - *) - rc=0 - ;; - esac - - exit $rc -fi +load_rc_config $name +run_rc_command "$1" diff --git a/security/cyrus-sasl/files/saslauthd.sh b/security/cyrus-sasl/files/saslauthd.sh index 966179116d16..a07e4a8c7c0d 100644 --- a/security/cyrus-sasl/files/saslauthd.sh +++ b/security/cyrus-sasl/files/saslauthd.sh @@ -25,72 +25,12 @@ saslauthd1_enable="%%ENABLE_SASLAUTHD%%" # Enable saslauthd #saslauthd1_program="${prefix}/sbin/saslauthd1" # Location of saslauthd1 saslauthd1_flags="-a pam" # Flags to saslauthd program -if [ -f /etc/rc.subr ]; then - . /etc/rc.subr +. %%RC_SUBR%% - name="saslauthd1" - rcvar=`set_rcvar` - command="${prefix}/sbin/${name}" - pidfile="/var/state/${name}/mux.pid" +name="saslauthd1" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +pidfile="/var/state/${name}/mux.pid" - load_rc_config $name - run_rc_command "$1" -else - # 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 - - if [ -n "${sasl_saslauthd1_enable}" ]; then - echo "sasl_saslauthd1_enable has been depreciated, use saslauthd1_enable instead" - saslauthd1_enable=$sasl_saslauthd1_enable - fi - - if [ -z "${saslauthd1_program}" ]; then - saslauthd1_program=${prefix}/sbin/saslauthd1 - fi - - if [ -n "${sasl_saslauthd1_flags}" ]; then - echo "sasl_saslauthd1_flags has been depreciated, use saslauthd1_flags instead" - saslauthd1_flags=$sasl_saslauthd1_flags - fi - - rc=0 - - case "${saslauthd1_enable}" in - [Yy][Ee][Ss]) - case "${1}" in - - start) - if [ -x ${saslauthd1_program} ] ; then - ${saslauthd1_program} ${saslauthd1_flags} \ - && echo -n " saslauthd1" - fi - ;; - - stop) - if [ -r /var/state/saslauthd1/mux.pid ]; then - kill `cat /var/state/saslauthd1/mux.pid` && \ - echo -n " saslauthd1" - rm /var/state/saslauthd1/mux.pid - fi - ;; - - *) - echo "usage: $0 {start|stop}" 1>&2 - rc=64 - ;; - esac - ;; - *) - rc=0 - ;; - esac - - exit $rc -fi +load_rc_config $name +run_rc_command "$1" |