slapd upgrade fails: chown: cannot access `olcDbDirectory\nolcDbDirectory': No such file or directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openldap (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: slapd
slapd upgrade fails with:
iain@stronginth
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up slapd (2.4.11-0ubuntu6.1) ...
Backing up /etc/ldap/slapd.d/ in /var/backups/
chown: cannot access `olcDbDirectory
dpkg: error processing slapd (--configure):
subprocess 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)
The attempt to parse out the olcDbDirectory in /var/lib/
--- slapd.postinst 2009-01-29 22:32:24.000000000 +0000
+++ /var/lib/
@@ -229,7 +229,7 @@
get_directory() { # {{{
# Returns the db directory for a given suffix
if [ -d "${SLAPD_CONF}" ] && echo `get_suffix` | grep -q "$1" ; then
- grep "olcDbDirectory:" `grep -l "olcSuffix: $1" ${SLAPD_
+ grep -H "olcDbDirectory:" `grep -l "olcSuffix: $1" ${SLAPD_
elif [ -f "${SLAPD_CONF}" ]; then
# Extract the directory for the given suffix ($1)
for f in `get_all_
which is more robust in the face of multiple matches. Extra credit is given for explicitly grepping out junk.
# lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10
# apt-cache policy slapd
slapd:
Installed: 2.4.11-0ubuntu6.1
Candidate: 2.4.11-0ubuntu6.1
Version table:
*** 2.4.11-0ubuntu6.1 0
500 http://
100 /var/lib/
2.
500 http://
Changed in openldap: | |
importance: | Undecided → Low |
status: | New → Triaged |
Did some investigation on 8.10:
My object value has a space in it, which was not handled due to insufficient quoting in the post-install script.
I hacked around it by making the script just return success.
When I upgraded to 9.04 I got the same error report.