Re: autofs help

H. Peter Anvin (hpa@transmeta.com)
Thu, 17 Apr 1997 09:34:11 -0700 (PDT)


> I'd like to start using (and testing) the autofs feature of the
> new 2.1 kernels. I built my kernel (2.1.35) with module support for autofs,
> and got the autofs tools from linux.kernel.org. The one problem I'm
> having, is ... how do you use it? I closely examined the rc.automount
> example script (for starting it), and it made perfect sense. But the
> options "dir" "map_type" and "[args]" that automount expects are unclear
> to me. I don't need hand-holding, but a sample script (with comments :)
> would be very much appreciated. I'm a veteran of amd and would to love to
> kick it the hell off my hard drive (at work too; it sucks like nobody's
> business).

The options are basically:

automount <root-automount-point> <type-of-map>[,<format>] <map-name>
[options...]

*Currently* (and I hope to have that change in the next release) the
only type-of-map supported is "yp", meaning an YP/NIS map in a subset
of Sun format:

key server:/path/name

For example, given a YP map "auto.foo":

hpa cesium:/export/home/cesium/&
torvalds penguin:/export/home/penguin/&

The "&" is replaced with the key.

If the root-automount-point is /foo, then the above map will define
/foo/hpa and /foo/torvalds.

You would start automount with:

automount /foo yp auto.foo

The rc script is there to read a Sun-style "auto.master" map and
invoke automount using that.

It should be pointed out that the map format and lookup method are not
encoded into automount itself, rather they are encoded in
/usr/lib/autofs/lookup_yp.so and /usr/lib/autofs/parse_sun.so.
Additional modules can be written and placed in this directory.

-hpa