[Pkg-openldap-devel] r1418 - openldap/trunk/debian
marschap-guest at alioth.debian.org
marschap-guest at alioth.debian.org
Tue May 1 13:52:15 UTC 2012
Author: marschap-guest
Date: 2012-05-01 13:52:14 +0000 (Tue, 01 May 2012)
New Revision: 1418
Modified:
openldap/trunk/debian/slapd.scripts-common
Log:
debian/slapd.scripts-common: avoid grep warnings
Restrict the arguments for grep from:
${SLAPD_CONF}/cn\=config/olcDatabase*
to the ldif files for the "base" databases only:
${SLAPD_CONF}/cn\=config/olcDatabase*.ldif
excluding the sub-directories matching the former pattern
and hence avoiding the warning logged to the screen.
An alternative solution would be to redirect stderr to /dev/null.
Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common 2012-01-05 06:07:34 UTC (rev 1417)
+++ openldap/trunk/debian/slapd.scripts-common 2012-05-01 13:52:14 UTC (rev 1418)
@@ -275,14 +275,14 @@
sed -n -e's/^suffix[[:space:]]\+"*\([^"]\+\)"*/\1/p' $f
done
else
- grep -h olcSuffix ${SLAPD_CONF}/cn\=config/olcDatabase* | cut -d: -f 2
+ grep -h olcSuffix ${SLAPD_CONF}/cn\=config/olcDatabase*.ldif | cut -d: -f 2
fi
}
# }}}
get_directory() { # {{{
# Returns the db directory for a given suffix
if [ -d "${SLAPD_CONF}" ] && get_suffix | grep -q "$1" ; then
- grep "olcDbDirectory:" `grep -l "olcSuffix: $1" ${SLAPD_CONF}/cn\=config/olcDatabase*` | cut -d: -f 2 | sed 's/^ *//g'
+ grep "olcDbDirectory:" `grep -l "olcSuffix: $1" ${SLAPD_CONF}/cn\=config/olcDatabase*.ldif` | cut -d: -f 2 | sed 's/^ *//g'
elif [ -f "${SLAPD_CONF}" ]; then
# Extract the directory for the given suffix ($1)
for f in `get_all_slapd_conf_files`; do
More information about the Pkg-openldap-devel
mailing list