]> git.sur5r.net Git - openldap/commitdiff
More POSIX 1003.1-2001 support: Replace test -a with &&. Replace egrep
authorHallvard Furuseth <hallvard@openldap.org>
Sat, 17 Sep 2005 22:44:03 +0000 (22:44 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sat, 17 Sep 2005 22:44:03 +0000 (22:44 +0000)
with $EGREP_CMD from configure.  (Renamed from configure's $EGREP just
in case egrep variants exist that use the EGREP environment variable.)

tests/run.in
tests/scripts/test023-refint

index 2043d8fd68212393a55a972f56e1c2941b707a2a..2f1f2bb8eef32822e16094aa76839a692d416013 100644 (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@
index b38993c61fa328323226ee0dbb935b0ff673f719..4b535b881dee18c6f3ff21ea6bf137d804ccf823 100755 (executable)
@@ -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