#!/bin/bash
#
# post-install for ldap-client service

. ${TOOLKIT}-functions.sh

$SOMETHING_CHANGED || exit 0


# updates ignored users list
sh /etc/init.d/libnss-ldap restart

add_init_script 23 "ku-disable-nss-ldap" S	|| exit $? # runlevel S!
add_init_script 21 "ku-enable-nss-ldap"		|| exit $? # alla fine runlevels 2 3 4 5

sh /etc/init.d/ku-enable-nss-ldap start

# cleanup oldbies
#
purgefiles /etc/network/if-post-down.d/ldap-check-off \
	/etc/network/if-up.d/ldap-check-on \
	/etc/init.d/disable-nss-ldap.sh /etc/init.d/enable-nss-ldap.sh \
	/etc/rc*.d/???disable-nss-ldap /etc/rc*.d/???enable-nss-ldap

exit 0
