Fix ldap schema import for Set module
This commit is contained in:
@ -33,23 +33,23 @@ RETURNED=$(ldbsearch --option="dsdb:schema update allowed"=true -H /var/lib/samb
|
||||
|
||||
if [ "$RETURNED" = "# returned 0 records" ]; then
|
||||
# Import schema
|
||||
SCHEMAS="cadoles.schema"
|
||||
SCHEMAS="cadoles.schema cadoles.schema-2"
|
||||
PRIVATE_DIR=/etc/eole/private
|
||||
|
||||
for schema in $SCHEMAS
|
||||
do
|
||||
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Error updating DN for ${schema}"
|
||||
break
|
||||
fi
|
||||
ldbmodify -H /var/lib/samba/private/sam.ldb /etc/ldap/schema/eole/${schema}.ldif --option="dsdb:schema update allowed"=true
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Error updating Schema ${schema} !!"
|
||||
break
|
||||
fi
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Error updating Schema ${schema} !!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user