Add default automount location. Auto-create auto.direct in new locations.

This commit is contained in:
Pavel Zuna 2010-02-12 13:33:25 +01:00 committed by Rob Crittenden
parent 85bb506d5b
commit b31f259b1a
2 changed files with 13 additions and 6 deletions

View File

@ -4,15 +4,19 @@ dn: cn=automount,$SUFFIX
add:objectClass: nsContainer add:objectClass: nsContainer
add:cn: automount add:cn: automount
dn: automountmapname=auto.master,cn=automount,$SUFFIX dn: cn=default,cn=automount,$SUFFIX
add:objectClass: nsContainer
add:cn: automount
dn: automountmapname=auto.master,cn=default,cn=automount,$SUFFIX
add:objectClass: automountMap add:objectClass: automountMap
add:automountMapName: auto.master add:automountMapName: auto.master
dn: automountkey=/-,automountmapname=auto.master,cn=automount,$SUFFIX dn: automountmapname=auto.direct,cn=default,cn=automount,$SUFFIX
add:objectClass: automountMap
add:automountMapName: auto.direct
dn: automountkey=/-,automountmapname=auto.master,cn=default,cn=automount,$SUFFIX
add:objectClass: automount add:objectClass: automount
add:automountKey: '/-' add:automountKey: '/-'
add:automountInformation: auto.direct add:automountInformation: auto.direct
dn: automountmapname=auto.direct,cn=automount,$SUFFIX
add:objectClass: automountMap
add:automountMapName: auto.direct

View File

@ -121,6 +121,9 @@ class automountlocation_add(LDAPCreate):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options): def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
# create auto.master for the new location # create auto.master for the new location
self.api.Command['automountmap_add'](keys[-1], u'auto.master') self.api.Command['automountmap_add'](keys[-1], u'auto.master')
self.api.Command['automountmap_add_indirect'](
keys[-1], u'auto.direct', key=u'/-'
)
return dn return dn
api.register(automountlocation_add) api.register(automountlocation_add)