1#! /bin/sh 2# OpenLDAP: pkg/ldap/tests/scripts/monitor_data.sh,v 1.2.2.3 2010/04/13 20:23:59 kurt Exp 3## This work is part of OpenLDAP Software <http://www.openldap.org/>. 4## 5## Copyright 1998-2010 The OpenLDAP Foundation. 6## All rights reserved. 7## 8## Redistribution and use in source and binary forms, with or without 9## modification, are permitted only as authorized by the OpenLDAP 10## Public License. 11## 12## A copy of this license is available in the file LICENSE in the 13## top-level directory of the distribution or, alternatively, at 14## <http://www.OpenLDAP.org/license.html>. 15 16MONITORDB="$1" 17SRCDIR="$2" 18DSTDIR="$3" 19 20echo "MONITORDB $MONITORDB" 21echo "SRCDIR $SRCDIR" 22echo "DSTDIR $DSTDIR" 23echo "pwd `pwd`" 24 25# copy test data 26cp "$SRCDIR"/do_* "$DSTDIR" 27if test $MONITORDB != no ; then 28 29 # add back-monitor testing data 30 cat >> "$DSTDIR/do_search.0" << EOF 31cn=Monitor 32(objectClass=*) 33cn=Monitor 34(objectClass=*) 35cn=Monitor 36(objectClass=*) 37cn=Monitor 38(objectClass=*) 39EOF 40 41 cat >> "$DSTDIR/do_read.0" << EOF 42cn=Backend 1,cn=Backends,cn=Monitor 43cn=Entries,cn=Statistics,cn=Monitor 44cn=Database 1,cn=Databases,cn=Monitor 45EOF 46 47fi 48 49