From fea76e7af2954edda33a230374e845d248cc5ace Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 19 Jul 2023 12:45:24 +0200 Subject: [PATCH] lsexample: make restore_lsexample compatible with OpenLDAP 2.5 (and Debian Bookworm) --- lsexample/restore_lsexample | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lsexample/restore_lsexample b/lsexample/restore_lsexample index 4fc840fc..4d9a3bc4 100755 --- a/lsexample/restore_lsexample +++ b/lsexample/restore_lsexample @@ -68,11 +68,14 @@ $SYS_SCHEMA_DIR/core.ldif $SYS_SCHEMA_DIR/cosine.ldif $SYS_SCHEMA_DIR/nis.ldif $SYS_SCHEMA_DIR/inetorgperson.ldif -$SYS_SCHEMA_DIR/ppolicy.ldif $SYS_SCHEMA_DIR/dyngroup.ldif $SAMBA_SCHEMA_LDIF $LS_SCHEMA_LDIF " + +# Extranet ppolicy schema removed in OpenLDAP 2.5, make its installation optional +[ -f "$SYS_SCHEMA_DIR/ppolicy.ldif" ] && SCHEMA_FILES="$SCHEMA_FILES $SYS_SCHEMA_DIR/ppolicy.ldif" + for file in $SCHEMA_FILES do [ $VERBOSE -eq 1 ] && echo "Install $( basename $file) schema..."