stanonik@nprdc.navy.mil (Ron Stanonik) (04/07/89)
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 That is, alpha (sun386) should get the help files locally, but everything else from the yp map auto.vol. It does mount help, but nothing from the yp gets mounted (as though having seen the name auto.vol once, as a file, it doesn't try again, from the map.) A bare + also doesn't work. (Inconsistent with how other files are yp mapped: passwd, group, ...) If the yp map has a different name, then it does mount from the map as well as the local file. (By the way, when testing be sure that automount was started in the same directory as the map file; eg, the current directory for automout started at boot time is probably /, so use /auto.mount. Also, I've found that kill -9 automount is just trouble, but kill -TERM makes it clean up after itself, so it can restarted by hand.) That is, suns (386s in this case), with lots of disk, probably want to get things locally, but the others want to mount from a server. I could also imagine a use for this with third party software not site licensed, which expects to reside in /vol; ie, /auto.vol would mount it locally. Ron Stanonik stanonik@nprdc.navy.mil [[ I don't know about the same directory stuff. Seems to me that I was starting the automounter from some directory other than /etc and was giving it "/etc/automount.conf" for a file name. What problems have you experienced starting it in a different directory? --wnl ]]
brent%terra@sun.com (Brent Callaghan) (04/27/89)
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 ]]
stanonik@nprdc.navy.mil (Ron Stanonik) (04/27/89)
Sorry, the comment about starting automount from the same directory as the automount map was somewhat (completely?) bogus. Our auto.master says /vol auto.vol The 386i's start automount from rc.local in / as automount -tw 300 I was trying to allow the 386i's local control over /vol without changing their rc.local. Since automount first looks for a file, putting auto.vol in / would allow automount to find it. Yes, bizzare. People will always (ab)use a program in ways never dreamed (nightmared). I've since just changed rc.local to automount -tw 300 /vol /etc/auto.vol. Thanks, Ron Stanonik stanonik@nprdc.arpa ucsd!nprdc!stanonik