Date: Tue, 9 Sep 2008 11:23:13 GMT From: Alexander Kriventsov <akriventsov@masterhost.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/127245: [PATCH] net/openldap24-server: fixed support of multiple databases in slapd rc script Message-ID: <200809091123.m89BNDeY055956@www.freebsd.org> Resent-Message-ID: <200809091130.m89BU1Dj058951@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809091123.m89BNDeY055956>