I can start slapd directly, but not from the startup script slapd.sh and therefore not automatically at boot.
Starting slapd directly works fine, and I can access the database: [EMAIL PROTECTED] aaron]# ll /usr/local/libexec/slapd -rwxr-xr-x 1 root wheel 633748 Nov 1 11:00 /usr/local/libexec/slapd*
Here's my startup script, installed from the port: [EMAIL PROTECTED] aaron]# ll /usr/local/etc/rc.d/slapd.sh -r-xr-xr-x 1 root wheel 2472 Nov 1 11:00 usr/local/etc/rc.d/slapd.sh
Here's what I get when I try to start it: [EMAIL PROTECTED] aaron]# /usr/local/etc/rc.d/slapd.sh start Starting slapd.
However, slapd doesn't show up in "$ sockstat -4"
Here's what I get when I turn on shell debugging:
[EMAIL PROTECTED] aaron]# sh -x /usr/local/etc/rc.d/slapd.sh start
... lots and lots of shell execution messages, including this:
+ checkyesno slapd_enable
+ eval _value=$slapd_enable
+ _value=YES
+ debug checkyesno: slapd_enable is set to YES.
+ return 0
+ eval rc_pid=$(check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd )
+ check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd
+ _pidfile=/var/run/openldap/slapd.pid
+ _procname=/usr/local/libexec/slapd
+ _interpreter=
+ [ -z /var/run/openldap/slapd.pid -o -z /usr/local/libexec/slapd ]
+ [ ! -f /var/run/openldap/slapd.pid ]
+ debug pid file {/var/run/openldap/slapd.pid): not readable.
+ return
...
Note the 2nd to last line that ends in "slapd.pid): not readable. (Which, ironically, includes an emoticon frownie-face.)
[EMAIL PROTECTED] aaron]# ll /var/run/openldap/slapd.pid ls: /var/run/openldap/slapd.pid: No such file or directory
Here's the relevant lines from /usr/local/etc/openldap/slapd.conf pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
OK, so I'll create those files: [EMAIL PROTECTED] run]# cd /var/run/openldap/ [EMAIL PROTECTED] openldap]# touch slapd.pid slapd.args [EMAIL PROTECTED] openldap]# ll total 4 drwxr-xr-x 2 ldap ldap 512 Nov 9 12:34 ./ drwxr-xr-x 6 root wheel 512 Nov 9 12:06 ../ -rw-r--r-- 1 root ldap 0 Nov 9 12:34 slapd.args -rw-r--r-- 1 root ldap 0 Nov 9 12:34 slapd.pid
They are owner/group root:ldap, izzat OK or should it be ldap:ldap? We'll change it a little later.
Anyway, now that I've touched the pid file, let's start again:
Well, here's progress, or change at least:
[EMAIL PROTECTED] openldap]# sh -x /usr/local/etc/rc.d/slapd.sh start
...
+ checkyesno slapd_enable
+ eval _value=$slapd_enable
+ _value=YES
+ debug checkyesno: slapd_enable is set to YES.
+ return 0
+ eval rc_pid=$(check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd )
+ check_pidfile /var/run/openldap/slapd.pid /usr/local/libexec/slapd
+ _pidfile=/var/run/openldap/slapd.pid
+ _procname=/usr/local/libexec/slapd
+ _interpreter=
+ [ -z /var/run/openldap/slapd.pid -o -z /usr/local/libexec/slapd ]
+ [ ! -f /var/run/openldap/slapd.pid ]
+ read _pid _junk
+ [ -z ]
+ debug pid file {/var/run/openldap/slapd.pid): no pid in file.
+ return
...
Note that now there's "no pid in file," and a couple lines up from that it says "read _pid _junk."
At this point I tried chown ldap:ldap slapd.pid, but got exactly the same results, junk pid.
Here's my system and port information:
[EMAIL PROTECTED] aaron]# uname -a
FreeBSD haiku.krelm.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Sat Sep 20 02:41:27 MDT 2003 [EMAIL PROTECTED]:/usr/src/sys/compile/HAIKU i386
[EMAIL PROTECTED] openldap]# portversion -v |grep ldap openldap-client-2.1.22 = up-to-date with port openldap-server-2.1.22_2 = up-to-date with port
Open to suggestions.
-- Aaron [EMAIL PROTECTED]
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"