doing a "/etc/init.d/slapd stop" followed by "/etc/init.d/slapd start" produces the following error: WARNING: "slapd" has already been started. Checking at the init scripts it looks to me as if there is an inconsistency between the path to the path for the .pid files in the init scripts ie "/var/state/openldap/slapd.pid" and the one specified in /etc/openldap/sldap.conf which points to "/var/lib/slapd.pid".
both should really say /var/run/sldap.pid
*** Bug 14416 has been marked as a duplicate of this bug. ***
Same with 2.1.12 and probably all others... so are anyone going to fix this? seam to me being one of the easiest one around. It defnately have to be in /var/run/ and nowere else...
Well I was a bit hasty, it appear to be a tricky one but this seam to work, at least for version 2.1.12 in /etc/init.d/slapd comment out #touch /var/state/openldap/slapd.pid #chown ldap:ldap /var/state/openldap/slapd.pid and change path for pidfile under stop() to /var/run/openldap/slapd.pid so the file read: #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /home/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-2.1-r1.rc6,v 1.1 2003/01/30 00:18:16 raker Exp $ depend() { need net } start() { ebegin "Starting ldap-server" start-stop-daemon --start --quiet --exec /usr/lib/openldap/slapd -- -u ldap -g ldap ${OPTS} #touch /var/state/openldap/slapd.pid #chown ldap:ldap /var/state/openldap/slapd.pid eend $? } stop() { ebegin "Stopping ldap-server" start-stop-daemon --stop --quiet --pidfile /var/run/openldap/slapd.pid --exec /usr/lib/openldap/slapd eend $? } do #mkdir /var/run/openldap #chown ldap:ldap /var/run/openldap Edit slapd.conf #nano -w /etc/openldap/slapd.conf and set path for pidfile and argsfile to same as above "/var/run/openldap/filename" There is no need for the start script to creat the pid file. However, there still are something strange as the pidfile never get killed but stays and there is also an slapd.args file created when openldap startup. Anyhow this seam to work with 2.1.12 and if some dev bit in on it we might can have a ready-to-go ebuild soon. I run it with Berkeley 4.1.25 (just used 4.1.24 script and bumped version in scriptname, removed "-" infront of x86 and put it in PORTAGE_OVERLAY. x86-1.4 profile have to be changed as well to allow bdb newer then current roof 3.2.9 - It all seam to work smooth as butter is melting in the sun... with latest cyrus-sasl and kerberos (havn't tested that really yet though).
Simple Fix: make the ebuild create the directory "/var/run/openldap" now change "pidfile" and "argsfile" lines in /etc/openldap/slapd.conf to the following: pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args finally change the --pidfile parameters in the initscript (/etc/init.d/slapd) to the correct paths.
Right, but the "touch" and "chown" lines have to be removed as well. Openldap fixes this on its own and with them at least I get an segmentation error. But it shall also be noted, to all this to work db-4.1.x are needed. I actually use 4.1.25 which seam to work fine. I simply took and renamed the 4.1.24 ebuild. There is a patch for 4.1.25 as well but I didn't bother with it as it didn't efect me.
Are we possibly going to just fix all this with 2.1.16 and be done with it? http://www.openldap.org/software/download/ :)
the init scripts problem has now been fixed for 2.0.27-r3 and also 2.1.19. i'm not going to obselete the older 2.1.x ebuilds in favour of the revamped 2.1.19. please report any bugs in a new bug. i'm closing this now.