~ubuntu-branches/ubuntu/trusty/389-ds-base/trusty

« back to all changes in this revision

Viewing changes to ldap/admin/src/scripts/template-dbverify.in

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2013-08-30 00:31:55 UTC
  • mfrom: (1.2.1)
  • Revision ID: package-import@ubuntu.com-20130830003155-oimuzdqopkvp2cd0
Tags: 1.3.1.7-0ubuntu1
Sync from unreleased debian git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
prefix="{{DS-ROOT}}"
4
 
if [ "$prefix" = "/" ] ; then
5
 
    prefix=""
6
 
fi
7
 
 
8
 
libpath_add() {
9
 
    [ -z "$1" ] && return
10
 
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
11
 
}
12
 
 
13
 
libpath_add "$prefix{{SERVER-DIR}}"
14
 
libpath_add "$prefix@nss_libdir@"
15
 
libpath_add "$prefix@libdir@"
16
 
libpath_add "$prefix@pcre_libdir@"
17
 
 
18
 
export LD_LIBRARY_PATH
19
 
SHLIB_PATH=$LD_LIBRARY_PATH
20
 
export SHLIB_PATH
21
 
 
22
 
args=""
23
 
while [ "$1" != "" ]
24
 
do
25
 
    if [ "$1" = "-n" ]; then
26
 
        args=$args" "$1
27
 
        shift
28
 
        args=$args" "$1
29
 
    elif [ "$1" = "-V" ]; then
30
 
        args=$args" "$1
31
 
    else
32
 
        echo "Usage: dbverify [-n backend_instance] [-V]"
33
 
        echo "Note : if \"-n backend_instance\" is not passed, verify all DBs."
34
 
        echo "  -V : verbose"
35
 
        exit 1
36
 
    fi
37
 
    shift
38
 
done
39
 
 
40
 
 
41
3
cd {{SERVERBIN-DIR}}
42
 
./ns-slapd dbverify -D {{CONFIG-DIR}} $args
43
 
if [ $? -eq 0 ]; then
44
 
    echo "DB verify: Passed"
45
 
    exit 0
46
 
else
47
 
    echo "DB verify: Failed"
48
 
    exit 1
49
 
fi
 
4
./dbverify "$@" -Z {{SERV-ID}}
 
5
exit $?
 
 
b'\\ No newline at end of file'