[Freeipa-devel] [PATCH] 928 fix automount submounts

Rob Crittenden rcritten at redhat.com
Mon Jan 30 19:41:57 UTC 2012


Rob Crittenden wrote:
> Jakub Hrozek wrote:
>> On Mon, Jan 30, 2012 at 02:51:42PM +0100, Martin Kosek wrote:
>>> On Thu, 2012-01-19 at 16:56 -0500, Rob Crittenden wrote:
>>>> There is a --parentmap option in automountmap-add-indirect. This is
>>>> used
>>>> to create submount maps but wasn't working at all. It now creates the
>>>> proper key entry pointing to another map.
>>>>
>>>> See ticket https://fedorahosted.org/freeipa/ticket/1268 for more
>>>> details
>>>> and examples.
>>>>
>>>> rob
>>>
>>> Works fine. I have just one minor issue. There was one untranslatable
>>> string:
>>>
>>> + textui.print_plain('maps not connected to /etc/auto.master:')
>>>
>>> I just wonder - can automount maps contain spaces? They are allowed in
>>> our framework. I think this part would not work correctly then:
>>>
>>> automountinformation='-fstype=autofs ldap:%s' % map
>>>
>>> Martin
>>>
>>
>> As far as automount is concerned, the maps are just filesystem names
>> (that's what automounter historically used). So a space would be rare and
>> unwise to use, but technically possible.
>
> I'll ask the autofs maintainer what he thinks. I think this would blow
> up their parser as well. This is their format, not ours.

I tried this out. Spaces work fine both in a mount name and in a map name:

/etc/auto.master:
/-      /etc/auto.direct
/attic  /etc/auto.attic
---------------------------
/etc/auto.direct:
---------------------------
/etc/auto.attic:
sub2    -fstype=autofs ldap:auto sub

maps not connected to /etc/auto.master:
---------------------------
/etc/auto sub:
space   attic:/foo bar
---------------------------

# ls /attic/sub2/space
test
# mount|grep attic
attic:/foo bar/ on /attic/sub2/space type nfs ...

So it looks like spaces aren't an issue.

rob




More information about the Freeipa-devel mailing list