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 authored and Rob Crittenden committed 2012-03-28 22:44:02 -04:00
1 parent 0b62700c8c
commit 944aacc7d5
1 file changed
+4
+4
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',