Re: [SLE] autofs starts auto.local but not in auto.master
From: Mark Andrews (mandrews_at_dkp.com)
Date: 04/13/05
- Previous message: Patrick Shanahan: "Re: [SLE] MySQL Database Setup"
- Maybe in reply to: Greg Whynott: "[SLE] autofs starts auto.local but not in auto.master"
- Next in thread: Darryl Gregorash: "Re: [SLE] autofs starts auto.local but not in auto.master"
- Reply: Darryl Gregorash: "Re: [SLE] autofs starts auto.local but not in auto.master"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Patrick Shanahan: "Re: [SLE] MySQL Database Setup"
- Maybe in reply to: Greg Whynott: "[SLE] autofs starts auto.local but not in auto.master"
- Next in thread: Darryl Gregorash: "Re: [SLE] autofs starts auto.local but not in auto.master"
- Reply: Darryl Gregorash: "Re: [SLE] autofs starts auto.local but not in auto.master"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|