[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.7-2-g8d1dd7d
Andreas B. Mundt
andi at debian.org
Wed Dec 5 21:10:00 UTC 2012
The following commit has been merged in the master branch:
commit 1a8d52dc7ab529dac2d22dfeeb3ddf203bf9e461
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 64da0e2..d150e2d 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`
@@ -202,6 +208,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