Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 1229ea04a1fd88b17eb28a1d6692fc3e > scriptlet

openldap-schema-pam_ldap-183-1.amd64.rpm

POSTIN

/bin/sh

for schema in /usr/share/openldap/schema/{pam_ldap-ns,ns-pwd-policy}.schema; do 
	if ! grep -q "$schema" /etc/openldap/slapd.conf; then 
		/bin/sed -i -e " 
			/^include.*local.schema/{ 
				iinclude\t	$schema
			} 
		" /etc/openldap/slapd.conf 
	fi 
done 
# enable dependant schemas 
if [ "" ]; then 
	/bin/sed -i -e ' 
	/^#include.*\(\)\.schema/{ 
		s/^#// 
	}' /etc/openldap/slapd.conf 
fi 
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/ldap ] && . /etc/sysconfig/ldap
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/ldap ]; then
/sbin/service ldap restart 1>&2 || :;
fi
fi };

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	
for schema in /usr/share/openldap/schema/{pam_ldap-ns,ns-pwd-policy}.schema; do 
	if grep -q "$schema" /etc/openldap/slapd.conf; then 
		/bin/sed -i -e " 
		/^include.*$(echo "$schema" | /bin/sed -e 's,/,\\/,g')/d 
		# for symmetry it would be nice if we disable enabled schemas in post, 
		# but we really can not do that, it would break something else. 
		" /etc/openldap/slapd.conf 
	fi 
done 
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/ldap ] && . /etc/sysconfig/ldap
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/ldap ]; then
/sbin/service ldap restart 1>&2 || :;
fi
fi };fi