xref: /netbsd-src/external/bsd/openldap/dist/tests/scripts/monitor_data.sh (revision e670fd5c413e99c2f6a37901bb21c537fcd322d2)
14e6df137Slukem#! /bin/sh
2d11b170bStron# $OpenLDAP$
34e6df137Slukem## This work is part of OpenLDAP Software <http://www.openldap.org/>.
44e6df137Slukem##
5*e670fd5cSchristos## Copyright 1998-2021 The OpenLDAP Foundation.
64e6df137Slukem## All rights reserved.
74e6df137Slukem##
84e6df137Slukem## Redistribution and use in source and binary forms, with or without
94e6df137Slukem## modification, are permitted only as authorized by the OpenLDAP
104e6df137Slukem## Public License.
114e6df137Slukem##
124e6df137Slukem## A copy of this license is available in the file LICENSE in the
134e6df137Slukem## top-level directory of the distribution or, alternatively, at
144e6df137Slukem## <http://www.OpenLDAP.org/license.html>.
154e6df137Slukem
16*e670fd5cSchristosSRCDIR="$1"
17*e670fd5cSchristosDSTDIR="$2"
184e6df137Slukem
194e6df137Slukemecho "SRCDIR $SRCDIR"
204e6df137Slukemecho "DSTDIR $DSTDIR"
214e6df137Slukemecho "pwd `pwd`"
224e6df137Slukem
234e6df137Slukem# copy test data
244e6df137Slukemcp "$SRCDIR"/do_* "$DSTDIR"
254e6df137Slukem
264e6df137Slukem# add back-monitor testing data
274e6df137Slukemcat >> "$DSTDIR/do_search.0" << EOF
284e6df137Slukemcn=Monitor
294e6df137Slukem(objectClass=*)
304e6df137Slukemcn=Monitor
314e6df137Slukem(objectClass=*)
324e6df137Slukemcn=Monitor
334e6df137Slukem(objectClass=*)
344e6df137Slukemcn=Monitor
354e6df137Slukem(objectClass=*)
364e6df137SlukemEOF
374e6df137Slukem
384e6df137Slukemcat >> "$DSTDIR/do_read.0" << EOF
394e6df137Slukemcn=Backend 1,cn=Backends,cn=Monitor
404e6df137Slukemcn=Entries,cn=Statistics,cn=Monitor
414e6df137Slukemcn=Database 1,cn=Databases,cn=Monitor
424e6df137SlukemEOF
43