diff options
author | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2002-01-20 19:23:25 +0000 |
---|---|---|
committer | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2002-01-20 19:23:25 +0000 |
commit | cfa957e244f3eb0c36faceadb82dbd23c04e1011 (patch) | |
tree | 7dc1af8e27a7f0718be9dc48c263580ab199c935 /security/cyrus-sasl2/files/pwcheck.sh | |
parent | Limit attempt to build with 3DNow! support to i386 architecture. (diff) |
Fix OpenLDAP v1 errors
Allow PAM aware pwcheck daemon
Add JavaSASL
PR: 34068
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=53400
Diffstat (limited to 'security/cyrus-sasl2/files/pwcheck.sh')
-rw-r--r-- | security/cyrus-sasl2/files/pwcheck.sh | 71 |
1 files changed, 53 insertions, 18 deletions
diff --git a/security/cyrus-sasl2/files/pwcheck.sh b/security/cyrus-sasl2/files/pwcheck.sh index ba07b9fc580a..3f4c903817a2 100644 --- a/security/cyrus-sasl2/files/pwcheck.sh +++ b/security/cyrus-sasl2/files/pwcheck.sh @@ -3,29 +3,64 @@ # $FreeBSD$ # +action=$1 + PREFIX=%%PREFIX%% -case "$1" in +# 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 -start) - if [ -x ${PREFIX}/sbin/pwcheck ] - then - ${PREFIX}/sbin/pwcheck & && echo -n " pwcheck" - fi - ;; +# The following sasl_pwcheck_* variables may be defined in rc.conf +# +# sasl_pwcheck_enable - Set to YES to enable pwcheck +# Default: %%ENABLEPWCHECK%% +# +# sasl_pwcheck_program - Path to pwcheck program (pwcheck/pwcheck_pam) +# Default: ${PREFIX}/sbin/%%PWCHECK%% -stop) - if [ -r /var/run/pwcheck.pid ] - then - kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck" - rm /var/run/pwcheck.pid - fi - ;; +if [ -z "${sasl_pwcheck_enable}" ] ; then + sasl_pwcheck_enable=%%ENABLEPWCHECK%% +fi -*) - echo "usage: $0 {start|stop}" 1>&2 - exit 64 - ;; +if [ -z "${sasl_pwcheck_program}" ]; then + sasl_pwcheck_program=${PREFIX}/sbin/%%PWCHECK%% +fi +rc=0 + +case "${sasl_pwcheck_enable}" in + [Yy][Ee][Ss]) + case "${action}" in + + start) + if [ -x ${sasl_pwcheck_program} ] ; then + ${sasl_pwcheck_program} & && echo -n " pwcheck" + fi + ;; + + stop) + if [ -r /var/run/pwcheck.pid ]; then + kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck" + rm /var/run/pwcheck.pid + fi + ;; + + *) + echo "usage: $0 {start|stop}" 1>&2 + rc=64 + ;; + esac + ;; + *) + rc=0 + ;; esac +exit $rc |