config is in phamm-ldap 0.5.18-3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]
# ask for the base initialization
db_input high phamm-ldap/init_base_ldap || true
db_go || true
db_get phamm-ldap/init_base_ldap || true
init_base_ldap="$RET"
if [ "$init_base_ldap" = "true" ]; then
# Let's try to read default from slapd.conf, libnss-ldap.conf or libpam_ldap.conf
if [ -f /etc/ldap/slapd.conf ]; then
basedn=`grep ^suffix /etc/ldap/slapd.conf | awk '{print $2}' | sed -e s/\"//g`
binddn=`grep -e "by dn=.* write" /etc/ldap/slapd.conf | cut -d"\"" -f2 | head -n1`
elif [ -f /etc/libnss-ldap.conf ]; then
basedn=`grep -e "^base" /etc/libnss-ldap.conf | awk '{print $2}' | sed -e s/\"//g`
binddn=`grep -e "^rootbinddn" /etc/libnss-ldap.conf | awk '{print $2}'`
elif [ -f /etc/pam_ldap.conf ]; then
basedn=`grep -e "^base" /etc/pam_ldap.conf | awk '{print $2}' | sed -e s/\"//g`
binddn=`grep -e "^rootbinddn" /etc/pam_ldap.conf | head -n1 | awk '{print $2}'`
elif [ -f /etc/phamm/config.php ]; then
db_get phamm/ldap-basedn || true
basedn="$RET"
else
# For the domain really.argh.org we create the basedn
# dc=really,dc=argh,dc=org with the dc entry dc: really
db_get slapd/domain
if [ -n "$RET" ]; then
basedn="dc=`echo $RET | sed 's/^\.//; s/\./,dc=/g'`"
fi
fi
if [ "$basedn" = "" ]; then
db_input high phamm-ldap/ldap-basedn || true
db_go || true
db_get phamm-ldap/ldap-basedn || true
basedn="$RET"
else
db_set phamm-ldap/ldap-basedn $basedn || true
fi
if [ "$binddn" = "" ]; then
db_set phamm-ldap/ldap-binddn "cn=admin,$basedn"
db_input high phamm-ldap/ldap-binddn || true
db_go || true
else
db_set phamm-ldap/ldap-binddn $binddn || true
fi
if [ "$bindpw" = "" ]; then
db_input high phamm-ldap/ldap-bindpw || true
db_go || true
else
db_set phamm-ldap/ldap-bindpw $bindpw || true
fi
db_input high phamm-ldap/ldap-phammpw || true
db_go || true
fi
exit 0
|