From 944aacc7d5ae2e2f0c621d80a26a9556c2d11e7e Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 15 Mar 2012 16:10:05 +0100 Subject: 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 --- ipalib/plugins/automount.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipalib/plugins/automount.py') diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index 31c143d8..9df400d2 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', -- cgit