[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, squeeze, updated. 0.7squeeze-2-g35ae310
Andreas B. Mundt
andi at debian.org
Wed Dec 5 21:10:02 UTC 2012
The following commit has been merged in the squeeze branch:
commit 27bcca1140d8bd1c8c392b719f6c1f083cee249d
Author: Andreas B. Mundt <andi at debian.org>
Date: Sat Dec 1 09:34:12 2012 +0100
Create OLC for slapd from the configuration file.
diff --git a/fai/config/scripts/KDC_LDAP/10-slapd-KDC b/fai/config/scripts/KDC_LDAP/10-slapd-KDC
index b7598a9..a08b505 100755
--- a/fai/config/scripts/KDC_LDAP/10-slapd-KDC
+++ b/fai/config/scripts/KDC_LDAP/10-slapd-KDC
@@ -83,8 +83,7 @@ cn=kdc-service,$KRB_CONT_DN#{HEX}$KDC_SERVICE_PW_HEX
cn=kadmin-service,$KRB_CONT_DN#{HEX}$KDC_SERVICE_PW_HEX
EOF
- ## bootstrap ldap with passwords inserted:
-
+ ## Bootstrap ldap with passwords inserted:
for ldif in $LDIFS; do
if $ROOTCMD cat $ldif | $ROOTCMD sed \
-e "s:@LDAP_ADMIN_PW_HASH@:$LDAP_ADMIN_PW_HASH:" \
@@ -99,6 +98,13 @@ EOF
$ROOTCMD chown -Rv openldap:openldap /var/lib/ldap
}
+## Create OLC:
+create_OLC() {
+ mkdir -p $target/etc/ldap/slapd.d
+ $ROOTCMD slaptest -v -f /etc/ldap/slapd.conf -F /etc/ldap/slapd.d
+ $ROOTCMD chown -R openldap:openldap /etc/ldap/slapd.d
+}
+
## Init Kerberos KDC
init_KDC() {
PID=`pidof slapd || /bin/true`
@@ -192,6 +198,7 @@ stop_slapd () {
init_LDAP
start_slapd
init_KDC
+create_OLC
stop_slapd
exit 0
--
Debian-LAN development and packaging
More information about the debian-lan-devel
mailing list