b458c96 Make submount automount maps work.

1 file Authored by rcritten 12 years ago, Committed by mkosek 12 years ago,
    Make submount automount maps work.
    
    Indirect automount nesting is achieved by adding a key that references
    another map. This isn't heirarchical, in fact, you can have multiple
    duplicate keys all pointing at the same map, which itself is mounted
    in other places. It can be a real mess if you want.
    
    In any case, a submount map has its information set to
    "-fstype=autofs <type>:<map>"
    
    The type can be any valid automount type: file, nis, yp, ldap, etc. We
    are going to hardcode ldap in when we create these using
    automountmap-add-indirect. If a user wants a different type they can
    create the key themselves (or edit it later).
    
    Here is an example of creating a submount:
    
    $ ipa automountlocation-add baltimore
    $ ipa automountmap-add-indirect baltimore auto.share --mount=/share
    $ ipa automountmap-add-indirect baltimore --parentmap=auto.share --mount=sub auto.sub
    $ ipa automountkey-add baltimore auto.sub --key=share --info=attic:/share
    $ ls /share/sub/share
    builds  lost+found
    
    This looks like:
    
    etc/auto.master:
    /-      /etc/auto.direct
    /share  /etc/auto.share
    ---------------------------
    /etc/auto.direct:
    ---------------------------
    /etc/auto.share:
    sub     -fstype=autofs ldap:auto.sub
    
    maps not connected to /etc/auto.master:
    ---------------------------
    /etc/auto.sub:
    share   attic:/share
    
    I've also added a catch-all when using the tofiles function. We were
    missing any maps that weren't attached to auto.master. They will now
    be shown along with whatever keys they have.
    
    https://fedorahosted.org/freeipa/ticket/1268
    
        
file modified
+72 -6