From b80e773c1d0139b5da6fcd7a25238dc05f49d83c Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Thu, 27 Aug 2009 15:46:20 +0200 Subject: Automatically generate an auto.master map for new automount location. Also, add the automountlocation-show command for completeness sake. --- ipalib/plugins/automount.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ipalib/plugins/automount.py') diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index 37b4f9aec..2ebdb0d7e 100644 --- a/ipalib/plugins/automount.py +++ b/ipalib/plugins/automount.py @@ -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. -- cgit