Re: [SLE] autofs starts auto.local but not in auto.master

From: Mark Andrews (mandrews_at_dkp.com)
Date: 04/13/05

  • Next message: Scott Stickeler: "Re: [SLE] PCI 802.11g client cards"
    Date: Wed, 13 Apr 2005 17:41:36 -0400
    To: suse-linux-e@suse.com
    
    

    > Unless there are massive changes to the autofs scripts between 9.0 and
    > whatever version you're running, you need to take a look at all the
    > manpages for the automounter. This line in auto.master tells autofs to
    > create an automount with mountpoint /n using mapfile yp, with option
    > auto.local applied to each entry in that mapfile. See man auto.master;
    > it is just a coincidence that this line yields a valid commandline for
    > automount. In particular, there is no "n directive" for auto.master.

    That's not correct. If you add:

        /n yp auto.local

    /n is the (indirect) mount point, yp is the type of automount map (NIS)
    and auto.local is the name of the NIS map.

    The synopsis line in the automount(8) man page indicates that the usage
    of the automount command is:

        automount [options] mount-point map-type[,format] map
    [map-options]

    By adding the "/n" entry to /etc/auto.master, an instance of the
    automount daemon is effectively executed as:

        /usr/sbin/automount /n yp auto.local

    which is what we want and it does work as expected. That's the source of
    the second automount instance that Greg reported.

    The first instance of the automount daemon is caused by the contents of
    the auto.master NIS map and the presence of the "nis"
    token in the automount entry in /etc/nsswitch.conf.

    When the autofs init.d script fires up, it searches /etc/nsswitch.conf
    for an entry for "automount". If the right hand side of the
    colon delimeted entry includes the keyword "nis", it executes an
    instance of automount based on the contents of the NIS
    auto.master map.

    Our auto.master NIS map contains the following:

        /n yp:auto.local

    This generates the following instance of automount on SuSE boxes:

        /usr/sbin/automount /n yp yp:auto.local

    which does not work as expected, because there is no NIS/YP map named
    "auto.local".

    The RedHat autofs init.d script is "smart" enough to break the second
    argument in the NIS auto.master file into two tokens, "yp" and "auto.local".
    As a result, the contents of the auto.master NIS map changes from:

        /n yp:auto.master

    to:

       /n yp auto.master

    which when used as arguments to the automount daemon, starts an instance
    of automount which works:

        /usr/sbin/automount /n yp auto.local

    In order to start one instance of automount on a SuSE system with the
    correct arguments, we do the following:

    (1) Edit /etc/nsswitch.conf and remove "nis" from the entry for automount
    (2) Append the following entry to /etc/auto.master file:

          /n yp auto.local

    and it does what we want.

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Scott Stickeler: "Re: [SLE] PCI 802.11g client cards"

    Relevant Pages

    • Re: NIS and autofs and /net
      ... That's where the nis maps are ... will already drag in the nis map that you have referenced ... since when does your automount daemon pay any attention to ... that script is responsible for the interpretation of auto.master. ...
      (comp.os.linux.misc)
    • Re: [SLE] autofs starts auto.local but not in auto.master
      ... 3.x version of autofs, then probably the same applies to you as well. ... > (NIS) and auto.local is the name of the NIS map. ... > automount daemon is effectively executed as: ... autofs used in SuSE seems to have been taken from Debian. ...
      (SuSE)
    • Re: How to selectively distribute NIS maps
      ... >> ignore the NIS map, but then I would get something different mounted. ... > There's no way I'm aware of to selectively ignore specific mounts on the ... You can have files prior to NIS for the automount service, ...
      (comp.unix.solaris)
    • Re: NIS+ and GNOME
      ... It is about automount of the DVD ROM. ... I've worked with NIS+ but I don't understand what you mean ... account in /etc/passwd. ...
      (comp.os.linux.misc)
    • Re: Automounter map changes
      ... > I have setup the automount using NIS. ... > The client has mounted the above export. ... > and then rebuild and push the NIS map. ...
      (comp.unix.aix)