Comment 3 for bug 892747

Revision history for this message
Sander Smeenk (ubuntu-freshdot) wrote :

This affects me too. In a grave way. The package is somewhat unusable with automated installers and/or puppet/cfengine.

Steps to reproduce:
1) make sure your system has *NO* slapd package installed
2) create /etc/ldap/slapd.conf (contents does not matter)
3) install the slapd package.

Result:
Setting up slapd (2.4.25-1.1ubuntu4.1) ...
  Creating initial configuration... mkdir: cannot create directory `/etc/ldap/slapd.conf': File exists
dpkg: error processing slapd (--configure):
 subprocess installed post-installation script returned error exit status 1

Also, on a sidenote, your postinst script is braindead. Your package offers a 'no_configuration' debconf setting but then fails to install the package since slapd wont start as there is no configuration:

# debconf-show slapd
* slapd/no_configuration: true

# apt-get install slapd
[ .. ]
Setting up slapd (2.4.25-1.1ubuntu4.1) ...
  Omitting slapd configuration as requested.
 * No configuration file was found for slapd at /etc/ldap/slapd.conf.
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error processing slapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)