Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 545792
Collapse All | Expand All

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

Return to bug 545792