diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2007-09-07 19:08:45 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2007-09-07 19:08:45 +0000 |
commit | 1676f9b5b6810403496c441a5545c9b361662f34 (patch) | |
tree | 60c218e6d9046286c39974a57a72022647bd129d /ldap/admin/src/scripts/template-dbverify.in | |
parent | ba217f8884cadc1b05dee3ca49201787be4983eb (diff) | |
download | ds-1676f9b5b6810403496c441a5545c9b361662f34.tar.gz ds-1676f9b5b6810403496c441a5545c9b361662f34.tar.xz ds-1676f9b5b6810403496c441a5545c9b361662f34.zip |
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
Diffstat (limited to 'ldap/admin/src/scripts/template-dbverify.in')
-rwxr-xr-x | ldap/admin/src/scripts/template-dbverify.in | 42 |
1 files changed, 42 insertions, 0 deletions
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 |