I have it run on all my replicated debian systems in a changed root
environment and it works fine. A file listing looks like
<ls -l /service/slapd/root>
drwxr-x--- 2 ldap ldap 4096 Mar 6 06:47 db
lrwxrwxrwx 1 ldap ldap 1 Jul 20 2002 etc -> .
-r--r--r-- 1 root root 13 Mar 6 06:47 group
-r--r--r-- 1 root root 143 Mar 6 06:47 ld.so.cache
-r--r--r-- 1 root root 0 Feb 13 2002 ld.so.conf
lrwxrwxrwx 1 ldap ldap 1 Jul 20 2002 ldap -> .
dr-xr-xr-x 2 root root 4096 Jul 20 2002 lib
-r--r--r-- 1 root root 20 Mar 6 06:47 passwd
drwxr-x--- 2 ldap ldap 4096 Feb 14 2002 run
drwxr-x--- 2 ldap ldap 4096 Sep 24 20:26 schema
-r--r----- 1 ldap ldap 2599 Sep 24 20:24 slapd.conf
lrwxrwxrwx 1 ldap ldap 1 Jul 20 2002 var -> .
</ls -l /service/slapd/root>
So this setting provides for /etc, /lib, /var/db, /var/run, /etc/schema,
/etc/password etc.
The group and password files simply define the user/group: ldap/ldap,
the root/lib directory looks like:
<ls -l /service/slapd/root/lib/>
lrwxrwxrwx 1 ldap ldap 2 Jul 20 2002 ldap -> ..
-r--r--r-- 1 root root 40140 Dec 8 20:57
libnss_compat.so.2
lrwxrwxrwx 1 ldap ldap 6 Jul 20 2002 slurp -> ../run
</ls -l /service/slapd/root/lib/>
Update of lib/libnss_compat.so.2, ld.so.cache and file mode settings are
done with a simple shell script.
jordan
On Wed, 2003-03-05 at 22:03, Oscar Bonilla wrote:
> That won't work since slapd forks itself to the background and daemontools
> monitors the process. The best way to do it is to create a run script, for
> example:
>
> ---- cut here ----
> #!/bin/sh
>
> # use LOGLEVEL 4 for search filter logging
> # 1 trace function calls
> # 2 debug packet handling
> # 4 heavy trace debugging
> # 8 connection management
> # 16 print out packets sent and received
> # 32 search filter processing
> # 64 configuration file processing
> # 128 access control list processing
> # 256 stats log connections/operations/results
> # 512 stats log entries sent
> # 1024 print communication with shell backends
> # 2048 entry parsing
>
> LOGLEVEL=256
> HOST=ldap.domain.com
>
> exec /usr/local/libexec/slapd -s 0 -d ${LOGLEVEL} -u ldap -g ldap -f
> /usr/local/etc/openldap/slapd.conf -h "ldap://${HOST}/ ldaps://${HOST}/
> ldap://localhost/" 2>&1
> ---- cut here ----
>
> regards,
>
> -Oscar
[snip]