df15f5fedf
* OpenLDAP 2.0 is no longer actively maintained by the OpenLDAP Project. * You are strongly encouraged to update to OpenLDAP 2.1 * Port maintainers: Please respect the default in bsd.port.mk * I plan to remove OpenLDAP 2.0 from the FreeBSD ports tree May 2004 - Update net/openldap21-client and net/openldap21-server to version 2.1.23 - Update net/openldap22-client and net/openldap22-server to version 2.2.2.b, fix ITS#2747 from CVS - some fixes for net/openldap20-server from CVS, seems like there won't be a 2.0.28 release anymore - remove conflict with deleted port net/openldap12 - use PORTDOCS - use USE_OPENSSL - don't use _REENTRANT - add a deinstall message PR: 58278 Submitted by: me Approved by: marcus (mentor)
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
CHOWN=/usr/sbin/chown
|
|
ECHO_CMD=echo
|
|
GREP=/usr/bin/grep
|
|
PW=/usr/sbin/pw
|
|
|
|
FTPUSERS=/etc/ftpusers
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
|
|
${ECHO_CMD}
|
|
if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
|
|
if ! ${PW} groupadd -n ldap -g 389; then
|
|
${ECHO_CMD} "*** Failed to add a group ldap with id 389."
|
|
${ECHO_CMD}
|
|
${ECHO_CMD} "Please add the ldap user manually with"
|
|
${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
|
|
${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
|
|
${ECHO_CMD} "and retry installing this package."
|
|
exit 1
|
|
fi
|
|
${ECHO_CMD} "===> Group 'ldap' created."
|
|
fi
|
|
if ! ${PW} useradd -n ldap -u 389 -g ldap -c 'OpenLDAP Server' \
|
|
-d /nonexistent -s /sbin/nologin -h -; then
|
|
${ECHO_CMD} "*** Failed to add an user ldap with id 389."
|
|
${ECHO_CMD}
|
|
${ECHO_CMD} "Please add the ldap user manually with"
|
|
${ECHO_CMD} " ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
|
|
${ECHO_CMD} " -d /nonexistent -s /sbin/nologin -h -"
|
|
${ECHO_CMD} "and retry installing this package."
|
|
exit 1
|
|
fi
|
|
${GREP} -qs '^ldap$' ${FTPUSERS} || ${ECHO_CMD} ldap >> ${FTPUSERS}
|
|
${ECHO_CMD} "===> Account 'ldap' created."
|
|
fi
|
|
;;
|
|
esac
|