[Pkg-openldap-devel] r669 - openldap/trunk-2.3/debian

Russ Allbery rra at debian.org
Sat Jun 3 01:31:24 UTC 2006


Torsten Landschoff <torsten at debian.org> writes:

> Why use test ! -z instead of test -n? I am also not sure if this would
> work. This should be either

>   if [ ! -d /var/lib/ldap ] && [ -n $SLAPD_USER ] && [ -n $SLAPD_GROUP ];

> which also looks dangerous as it will not work if $SLAPD_USER is empty.
> How about

>   if [ ! -d /var/lib/ldap -a -n "$SLAPD_USER" -a -n "$SLAPD_GROUP" ]; then

> I still can not see why we'd require both SLAPD_USER and SLAPD_GROUP to
> be set for creating the directory. What is this code supposed to do?

[ ... ] && [ ... ] is recommended over -a since POSIX only requires that
the former work.

-- 
Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>



More information about the Pkg-openldap-devel mailing list