4 checkBox "ldap action wizard" "check options (slapcat OR ldapsearch)" \
5 "slapcat" "export ldif using slapcat" on \
6 "ldapsearch" "export ldif using ldapsearch" off \
7 "compress" "compress the ldif output files" on
9 compress="compress = off"
10 method="method = <unset>"
11 restart="restart = no"
14 [ $status = 1 ] && return;
16 for opt in $result; do
18 '"compress"') compress="compress = on";;
20 method="method = slapcat"
21 [ "$_RESTART" == "yes" ] && restart="restart = yes"
24 method="method = ldapsearch"
25 inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what password file to use. It must have the password with no trailing return and it should not be world readable."
27 passwordfile="passwordfile = $REPLY"
28 inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what DN to bind as:"
30 binddn="binddn = $REPLY"
31 require_packages ldap-utils
35 get_next_filename $configdirectory/30.ldap
36 cat > $next_filename <<EOF
42 # backupdir = /var/backups/ldap
43 # conf = /etc/ldap/slapd.conf
46 chmod 000 $next_filename
54 for backend in `grep -e "^backend" /etc/ldap/slapd.conf | awk '{print $2}'`; do
55 if [ "$backend" == "bdb" -a "$bdb" == "no" ]; then
57 elif [ "$backend" == "ldbm" -a "$ldbm" == "no" ]; then
62 if [ "$bdb" == "yes" -a "$ldbm" == "no" ]; then
63 msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to BDB. If this is not the case, exit this wizard! From this point on, we will assume BDB backend, which might have disasterious consequences if this is incorrect."
66 elif [ "$ldbm" == "yes" ]; then
67 msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to LDBM. Because of this, you will have less options (because it is not safe to use slapcat while slapd is running LDBM)."
71 msgBox "ldap action wizard" "I couldn't find any backends in your slapd.conf. Bailing out."