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
This commit is contained in:
Martin Kosek
2012-03-15 16:10:05 +01:00
committed by Rob Crittenden
parent 0b62700c8c
commit 944aacc7d5

View File

@@ -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',