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:
# 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)
This affects me too. In a grave way. The package is somewhat unusable with automated installers and/or puppet/cfengine.
Steps to reproduce: slapd.conf (contents does not matter)
1) make sure your system has *NO* slapd package installed
2) create /etc/ldap/
3) install the slapd package.
Result: 1.1ubuntu4. 1) ... slapd.conf' : File exists
Setting up slapd (2.4.25-
Creating initial configuration... mkdir: cannot create directory `/etc/ldap/
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 configuration: true
* slapd/no_
# apt-get install slapd 1.1ubuntu4. 1) ... slapd.conf.
[ .. ]
Setting up slapd (2.4.25-
Omitting slapd configuration as requested.
* No configuration file was found for slapd at /etc/ldap/
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)