FWIW, working from your patch, I added /dev/null as an argument to the grep, and had the 'cut' take the third field (as the first is now the filename), threw in a 'head -1' (hackishly, as I know that's the only one I need to update) and have now successfully completed the postinst.
In my case, I modified the lines to the following (sorry, not in patch format):
Thanks, Nathan.
FWIW, working from your patch, I added /dev/null as an argument to the grep, and had the 'cut' take the third field (as the first is now the filename), threw in a 'head -1' (hackishly, as I know that's the only one I need to update) and have now successfully completed the postinst.
In my case, I modified the lines to the following (sorry, not in patch format):
grep -h olcSuffix ${SLAPD_ CONF}/cn\ =config/ olcDatabase* /dev/null | head -1 | cut -d: -f 3
grep "olcDbDirectory:" `grep -l "olcSuffix: $1" ${SLAPD_ CONF}/cn\ =config/ olcDatabase* .ldif` /dev/null | head -1 | cut -d: -f 3 | sed 's/^ *//g'