--- /usr/portage/net-nds/openldap/files/slapd-initd-2.4.40-r1 2014-11-10 05:01:15.000000000 +0400 +++ /etc/init.d/slapd 2015-04-07 11:09:43.000000000 +0400 @@ -48,17 +48,17 @@ # Fallback CONF=${CONF-/etc/openldap/slapd.conf} [ -d $CONF ] && CONF=${CONF}/* - DBDIRS=`eval awk '"/^(directory|olcDbDirectory:)/{print \$2}"' $CONF` + DBDIRS=`eval awk '"/^(directory|olcDbDirectory:)/{print \\$2}"' $CONF` for d in $DBDIRS; do if [ ! -d $d ]; then eerror "Directory $d in config does not exist!" return 1 fi - /usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group ldap |grep -sq . - if [ $? -ne 0 ]; then + /usr/bin/find $d ! -name DB_CONFIG \( ! -user ldap -o ! -group ldap \)|grep -sq . + if [ $? -eq 0 ]; then ewarn "You have files in $d not owned by the ldap user, you must ensure they are accessible to the slapd instance!" fi - [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal" + [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal" done # now test the config fully /usr/sbin/slaptest -u "$@" ${OPTS_CONF}