ports/127245: [PATCH] net/openldap24-server: fixed support of multiple databases in slapd rc script
Alexander Kriventsov
akriventsov at masterhost.ru
Tue Sep 9 11:30:02 UTC 2008
>Number: 127245
>Category: ports
>Synopsis: [PATCH] net/openldap24-server: fixed support of multiple databases in slapd rc script
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Sep 09 11:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Alexander Kriventsov
>Release: FreeBSD 7.0-20080601-RELENG_7_0 amd64
>Organization:
.masterhost
>Environment:
FreeBSD ldap3.vega.ru 7.0-20080601-RELENG_7_0 FreeBSD 7.0-20080601-RELENG_7_0 #0: Sun Jun 1 22:41:16 UTC 2008 root at aleph.mgmt.vega.ru:/usr/obj/usr/src/sys/GENERICDEBUG amd64
>Description:
fixed support of multiple databases in slapd rc script.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
-- /usr/local/etc/rc.d/slapd.orig 2008-09-09 11:07:24.965926589 +0000
+++ /usr/local/etc/rc.d/slapd 2008-09-09 11:13:07.384620026 +0000
@@ -39,7 +39,7 @@
# extract user and group, adjust ownership of directories and database
-DBDIR=`awk '$1 == "directory" {print $2}' "/usr/local/etc/openldap/slapd.conf"`
+DATABASEDIR=`awk '$1 == "directory" {print $2}' "/usr/local/etc/openldap/slapd.conf"`
start_precmd()
{
@@ -49,14 +49,16 @@
""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
*)
- if [ ! -d "${DBDIR}" ]; then
- mkdir -p "${DBDIR}"
- cp "/usr/local/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
- fi
- chown "$slapd_owner" "/var/run/openldap"
- chown -RL "$slapd_owner" "${DBDIR}"
- chmod 700 "${DBDIR}"
- chown "$slapd_owner" "/usr/local/etc/openldap/slapd.conf"
+ for DBDIR in ${DATABASEDIR}; do
+ if [ ! -d "${DBDIR}" ]; then
+ mkdir -p "${DBDIR}"
+ cp "/usr/local/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
+ fi
+ chown "$slapd_owner" "/var/run/openldap"
+ chown -RL "$slapd_owner" "${DBDIR}"
+ chmod 700 "${DBDIR}"
+ chown "$slapd_owner" "/usr/local/etc/openldap/slapd.conf"
+ done
slapd_ownername="${slapd_owner%:*}"
slapd_groupname="${slapd_owner#*:}"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list