Masato Taruishi
taru****@users*****
2004年 10月 26日 (火) 12:37:43 JST
=================================================================== RCS file: ultrapossum/init.d/10config,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ultrapossum/init.d/10config 2004/10/09 06:40:13 1.10 +++ ultrapossum/init.d/10config 2004/10/26 03:37:43 1.11 @@ -7,13 +7,15 @@ _config_init() { case "$ULTRAPOSSUM_CONFIG_BACKEND" in ldap) - ldapsearch -LLL -x -H "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI" -b "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN" -D "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN" -w "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW" description=\* cn description | egrep '(cn:|description:)' | uniq | while read cn; do - read description - if echo $description | grep -v :: > /dev/null; then - cn=`echo $cn | cut -d' ' -f2-` - description=`echo $description | cut -d' ' -f2-` - if test "x${!cn}" = "x"; then - echo "$cn='$description'" + if test "x$cache" = "x"; then + ldapsearch -LLL -x -H "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI" -b "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN" -D "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN" -w "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW" description=\* cn description | egrep '(cn:|description:)' | uniq | while read cn; do + read description + if echo $description | grep -v :: > /dev/null; then + cn=`echo $cn | cut -d' ' -f2-` + description=`echo $description | cut -d' ' -f2-` + if test "x${!cn}" = "x"; then + echo "$cn='$description'" + fi fi fi done