More POSIX 1003.1-2001 support: Replace test -a with &&. Replace egrep

with $EGREP_CMD from configure.  (Renamed from configure's $EGREP just
in case egrep variants exist that use the EGREP environment variable.)
This commit is contained in:
Hallvard Furuseth 2005-09-17 22:44:03 +00:00
parent 16b144c64a
commit ad2ec8effa
2 changed files with 6 additions and 5 deletions

View File

@ -19,8 +19,9 @@ USAGE="$0 [-b <backend>] [-c] [-k] [-p] [-u] [-w] <script>"
SRCDIR="@srcdir@"
TOPSRCDIR="@top_srcdir@"
LN_S="@LN_S@"
EGREP_CMD="@EGREP@"
export SRCDIR TOPSRCDIR LN_S
export SRCDIR TOPSRCDIR LN_S EGREP_CMD
# backends
AC_bdb=@BUILD_BDB@

View File

@ -13,7 +13,7 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
if test "$BACKEND" != "bdb" -a "$BACKEND" != "hdb" ; then
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
@ -67,7 +67,7 @@ fi
echo "Searching unmodified database..."
$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \
egrep "(manager|secretary):" | sed "s/george/foster/g" | \
$EGREP_CMD "(manager|secretary):" | sed "s/george/foster/g" | \
sort > $SEARCHOUT 2>&1
RC=$?
@ -93,7 +93,7 @@ fi
echo "Using ldapsearch to check dependents new rdn..."
$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \
egrep "(manager|secretary):" | sort > $SEARCHFLT 2>&1
$EGREP_CMD "(manager|secretary):" | sort > $SEARCHFLT 2>&1
RC=$?
if test $RC != 0 ; then
@ -127,7 +127,7 @@ fi
echo "Using ldapsearch to verify dependents have been deleted..."
$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \
egrep "(manager|secretary):" > $SEARCHFLT 2>&1
$EGREP_CMD "(manager|secretary):" > $SEARCHFLT 2>&1
RC=$?
if test $RC != 0 ; then