Skip to content

Commit

Permalink
Merge pull request #393 from dmaes/master
Browse files Browse the repository at this point in the history
openldap_schema: fix replace w/o attribute types
  • Loading branch information
smortex committed Aug 29, 2023
2 parents 61aa9b1 + f25ce32 commit cdbded2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/puppet/provider/openldap_schema/olc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ def self.schemaToLdifReplace(schema, name)
ldif.push('-')
end

ldif.push('replace: olcAttributeTypes')
ldif.push(*attrType)
ldif.push('-')
unless attrType.empty?
ldif.push('replace: olcAttributeTypes')
ldif.push(*attrType)
ldif.push('-')
end

ldif.push('replace: olcObjectClasses')
ldif.push(*objClass)
Expand Down Expand Up @@ -154,9 +156,11 @@ def self.ldifReplace(ldif, name)
new_ldif.push('-')
end

new_ldif.push('replace: olcAttributeTypes')
new_ldif.push(*attrType)
new_ldif.push('-')
unless attrType.empty?
new_ldif.push('replace: olcAttributeTypes')
new_ldif.push(*attrType)
new_ldif.push('-')
end

new_ldif.push('replace: olcObjectClasses')
new_ldif.push(*objClass)
Expand Down

0 comments on commit cdbded2

Please sign in to comment.