Date: Fri, 04 Jul 2008 13:22:15 -0400 From: Mikhail Goriachev <mikhailg@webanoide.org> To: delphij@FreeBSD.org, ports@FreeBSD.org Subject: FreeBSD Port: openldap-server-2.4.10 Message-ID: <20080704132215.36754y85s8y8kisk@www.san.navalradio.cl>
next in thread | raw e-mail | index | archive | help
Hi, Due to our requirement, the database directory of the openldap-server =20 has been relocated from its default /var/db/openldap-data. However, =20 the daemon script /usr/local/etc/rc.d/slapd doesn't use the =20 "directory" entry from slapd.conf. When executed, it throws: chown: /var/db/openldap-data: No such file or directory chmod: /var/db/openldap-data: No such file or directory I slapped together a workaround. Here's a "patch", maybe the idea of =20 it will be of some use. Thanks for your time. --- slapd.original=092008-07-04 16:35:31.000000000 +0000 +++ slapd=092008-07-04 16:50:08.000000000 +0000 @@ -39,6 +39,8 @@ # extract user and group, adjust ownership of directories and database +DBDIR=3D`grep directory /usr/local/etc/openldap/slapd.conf | awk '{ =20 print $2 }'` + start_precmd() { local slapd_ownername slapd_groupname @@ -48,8 +50,8 @@ ;; *) chown "$slapd_owner" "/var/run/openldap" - chown -RL "$slapd_owner" "/var/db/openldap-data" - chmod 700 "/var/db/openldap-data" + chown -RL "$slapd_owner" "${DBDIR}" + chmod 700 "${DBDIR}" chown "$slapd_owner" "/usr/local/etc/openldap/slapd.conf" slapd_ownername=3D"${slapd_owner%:*}" Regards, Mikhail. --=20 Mikhail Goriachev Webanoide
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080704132215.36754y85s8y8kisk>