From 1676f9b5b6810403496c441a5545c9b361662f34 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Fri, 7 Sep 2007 19:08:45 +0000 Subject: Resolves: #236256 Summary: verify-db.pl (db_verify) does not work on a little endian machine (comment #1-#4) Description: 1) introducing dbverify mode to ns-slapd. 2) providing new script dbverify to call "ns-slapd dbverify" 3) fixing verify-db.pl to call dbverify instead of db_verify from BDB --- ldap/admin/src/scripts/template-dbverify.in | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 ldap/admin/src/scripts/template-dbverify.in (limited to 'ldap/admin/src/scripts/template-dbverify.in') diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in new file mode 100755 index 00000000..b5e56d9f --- /dev/null +++ b/ldap/admin/src/scripts/template-dbverify.in @@ -0,0 +1,42 @@ +#!/bin/sh + +prefix="{{DS-ROOT}}" +if [ "$prefix" = "/" ] ; then + prefix="" +fi +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ +if [ -n "$prefix" ] ; then + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" +fi +export LD_LIBRARY_PATH +SHLIB_PATH=$LD_LIBRARY_PATH +export SHLIB_PATH + +args="" +while [ "$1" != "" ] +do + if [ "$1" = "-n" ]; then + args=$args" "$1 + shift + args=$args" "$1 + elif [ "$1" = "-V" ]; then + args=$args" "$1 + else + echo "Usage: dbverify [-n backend_instance] [-V]" + echo "Note : if \"-n backend_instance\" is not passed, verify all DBs." + echo " -V : verbose" + exit 1 + fi + shift +done + + +cd {{SERVERBIN-DIR}} +./ns-slapd dbverify -D {{CONFIG-DIR}} $args +if [ $? -eq 0 ]; then + echo "DB verify: Passed" + exit 0 +else + echo "DB verify: Failed" + exit 1 +fi -- cgit