checkconfig() { # checks requested by bug #502948 CONF=`echo ${OPTS_CONF}|awk '/-f/{print $2}'` for d in `awk '/^directory/{print $2}' $CONF`; 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 [ $? -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" done # now test the config fully /usr/sbin/slaptest -u "$@" ${OPTS_CONF} }