Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: brent%terra@sun.com (Brent Callaghan) Newsgroups: comp.sys.sun Subject: Re: Problem with +mapname in auto maps Keywords: Networks Message-ID: <98039@sun.Eng.Sun.COM> Date: 27 Apr 89 09:06:54 GMT References: <8903231752.AA18500@atlantic.nprdc.navy.mil> Sender: usenet@rice.edu Organization: Sun-Spots Lines: 48 Approved: Sun-Spots@rice.edu Original-Date: 7 Apr 89 20:32:05 GMT X-Sun-Spots-Digest: Volume 7, Issue 259, message 1 of 13 stanonik@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 ]]