Automatically generate an auto.master map for new automount location.

Also, add the automountlocation-show command for completeness sake.
This commit is contained in:
Pavel Zuna 2009-08-27 15:46:20 +02:00 committed by Rob Crittenden
parent fa140e7f2a
commit b80e773c1d

View File

@ -118,6 +118,10 @@ class automountlocation_add(LDAPCreate):
"""
Create new automount location.
"""
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
# create auto.master for the new location
self.api.Command['automountmap_add'](keys[-1], u'auto.master')
return dn
api.register(automountlocation_add)
@ -130,6 +134,14 @@ class automountlocation_del(LDAPDelete):
api.register(automountlocation_del)
class automountlocation_show(LDAPRetrieve):
"""
Display automount location.
"""
api.register(automountlocation_show)
class automountlocation_find(LDAPSearch):
"""
Search for automount locations.