Problem with +mapname in auto maps

Brent Callaghan brent%terra at sun.com
Thu Apr 27 19:06:54 AEST 1989


stanonik at nprdc.navy.mil (Ron Stanonik) writes:
> We've got sun386s and sun4s running sunos 4.0.1.
> 
> Although the man page for automount says you can include a yp map in an
> automount map, apparently you can't include a yp map with the same name as
> the map file.
> 
> I was trying to use a map file /auto.vol to allow local control of
> automount, but have it default to the yp map.  /auto.vol on alpha looked
> like
> 
> help	alpha:/usr/lib/help
> +auto.vol

Perhaps I should clarify how the automounter finds its maps:

On its command line the automounter expects pairs of arguments where the
first arg is the mount point for the automounter (must begin with a slash)
and the second is the name of the map to use.

The automounter first assumes that the map name is the name of a local
file and attempts to open it.  Like any filename argument, it is just a
pathname.  If it doesn't begin with a slash then it is searched relative
to the automounter's current directory i.e. where it was started from.

If the file doesn't exist, then the automounter assumes that the name is
that of a Yellow Pages map and attempts a ypmatch on the map by that name.
Yes, you can certainly block access to a YP map if there's a file by the
same name in the automounter's current directory.

This method of finding the map is used for "+" entries in local maps.  The
automounter checks first for a file, then a YP map e.g.

	help   alpha:/usr/lib/help
	+/etc/auto.vol

Note: this isn't quite the same as a C #include - the file is always
searched relative to the automounter's current directory - not the
directory that contains the map that the "+" line is in.

	Brent

Made in New Zealand -->  Brent Callaghan  @ Sun Microsystems
			 uucp: sun!bcallaghan
			 phone: (415) 336 1051

[[ Great.  But what is the YP database "mountopts.bysitepair" used for?
And why doesn't the documentation mention it *anywhere*?  --wnl ]]



More information about the Comp.sys.sun mailing list