#!/bin/bash

. ${TOOLKIT}-functions.sh

# if ldap_managed = true, or reply server, can't install this module
#
ldap_managed=false
getconfirm ldap.managed && ldap_managed=true

repl=`jtconf ldap.repl_number 2>/dev/null` || :
repl=${repl:-0}

[ $repl != 0 ] && ldap_managed=false

$ldap_managed || {
	# cleanup ...
	rm -f /etc/ldap.secret
	rm -f /etc/ldap/ldap-template-*
	rm -f /usr/bin/ku-ldap-populate
	rm -f /usr/bin/ku-ldapsearch
	rm -f /usr/bin/ku-ldapupdate
	is_installed migrationtools && remove_pkgs migrationtools

	exit 1	# SKIP MODULE
}

exit 0
