summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-03-15 16:10:05 +0100
committerRob Crittenden <rcritten@redhat.com>2012-03-28 22:44:02 -0400
commit944aacc7d5ae2e2f0c621d80a26a9556c2d11e7e (patch)
treef35d952e6a9892a970a04809b8cfac1cddf34066 /ipalib
parent0b62700c8ca46cf41e2cd53ea9154ae558019a05 (diff)
downloadfreeipa-944aacc7d5ae2e2f0c621d80a26a9556c2d11e7e.tar.gz
freeipa-944aacc7d5ae2e2f0c621d80a26a9556c2d11e7e.tar.xz
freeipa-944aacc7d5ae2e2f0c621d80a26a9556c2d11e7e.zip
Improve automount indirect map error message
When user does not pass a name of parent map in automountmap-add-indirect command, auto.master is used as a default. However, when auto.master does not exist in a given location, we raise NotFound error with a name of a location instead of a name of the missing automount map. https://fedorahosted.org/freeipa/ticket/2387
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/automount.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 31c143d84..9df400d2e 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -845,6 +845,10 @@ class automountmap_add_indirect(LDAPCreate):
automountkey=options['key'], **kw
)
else: # adding to auto.master
+ # Ensure auto.master exists
+ self.api.Command['automountmap_show'](
+ keys[0], options['parentmap']
+ )
options['automountinformation'] = keys[1]
self.api.Command['automountkey_add'](
keys[0], u'auto.master',