diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-08-27 15:46:20 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-09-10 10:06:27 -0400 |
commit | b80e773c1d0139b5da6fcd7a25238dc05f49d83c (patch) | |
tree | 6f12e8ec4d9dbad5247a3e2e34f2eedbc131fab3 /ipalib/plugins/automount.py | |
parent | fa140e7f2a03023b83ef37f155a3fbefb1bda8c5 (diff) | |
download | freeipa-b80e773c1d0139b5da6fcd7a25238dc05f49d83c.tar.gz freeipa-b80e773c1d0139b5da6fcd7a25238dc05f49d83c.tar.xz freeipa-b80e773c1d0139b5da6fcd7a25238dc05f49d83c.zip |
Automatically generate an auto.master map for new automount location.
Also, add the automountlocation-show command for completeness sake.
Diffstat (limited to 'ipalib/plugins/automount.py')
-rw-r--r-- | ipalib/plugins/automount.py | 12 |
1 files changed, 12 insertions, 0 deletions
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. |