Mark Andrews wrote:
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:
Well, sorry, but that is correct for autofs 3.1 -- if you are using a 3.x version of autofs, then probably the same applies to you as well. The line you add to your auto.master file would work here as well (assuming I had a properly formatted NIS database named auto.local, of course), but only by accident.
/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.
Here is what man auto.master has to say on the syntax of that file: "FORMAT The file has three fields separated by an arbitrary number of blanks or tabs. Lines beginning with # are comments. The first field is the mount point. Second field is the map file to be consulted for this mount-point. The third field is optional and can contain options to be applied to all entries in the map. Options are cumulative, which is a difference to the behavior of the SunOS automounter. The format of the map file and the options are described in autofs(5). EXAMPLE /home /etc/auto.home /misc /etc/auto.misc " Thus [mount-point] [map-file] <options> and certainly not what you are saying.
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
Quite correct, quite correct, and quite correct. I already mentioned that this only works by sheer accident. On examining the autofs init script in much more detail, it looks like you could put anything you want in there in place of "yp" so long as it isn't an existing file or executable (and doesn't contain any whitespace, of course), and you'd get the same commandline for automount as you are getting now. From what you say later on, I am getting the impression that you believe all the files have the same syntax and the script(s) all work the same way in SuSE as in RH. That is not necessarily the case; the autofs used in SuSE seems to have been taken from Debian.
which is what we want and it does work as expected. That's the source of the second automount instance that Greg reported.
Of course it is, and I already said why.
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.
Quite correct. <snip>
Our auto.master NIS map contains the following:
/n yp:auto.local
Finally. Thank you. Perhaps the fact that yp:auto.local does not exist suggests you need to be looking at your NIS configuration, rather than your autofs configuration. However, you did happen by sheer luck to stumble onto a method which fakes SuSE's autofs script into achieving what you want, so I suppose the point is moot.
The RedHat autofs init.d script....
Here we are again, assuming that SuSE has to do it one particular way just because RH does it that way.