Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!cornell!uw-beaver!rice!sun-spots-request From: phri!roy@philabs.philips.com (Roy Smith) Newsgroups: comp.sys.sun Subject: Re: Termcap, printcap, and remotes in Yellow Pages Message-ID: <3624@phri.UUCP> Date: 16 Dec 88 00:51:04 GMT References: <8811222204.AA23011@dduck.ctt.bellcore.com> Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 48 Approved: Sun-Spots@rice.edu Original-Date: 4 Dec 88 23:50:08 GMT X-Sun-Spots-Digest: Volume 7, Issue 58, message 13 of 14 X-Issue-Reference: v7n37 In v7, i37, msg 12/12, sjs@ctt.bellcore.com (Stan Switzer) writes: > Has anyone ever tried to use the yellow pages to serve termcap, printcap, > or remotes entries? We put printcap into our yp maps a while ago. I'm actually rather surprised that Sun doesn't do that by default. We have the local copies of /etc/printcaps get searched first, then the YP printcap map. That way, all we need do is put an entry for each remote printer in the YP map and on the particular machines where the printers actually reside, put a local entry for that same printer in the local /etc/printcap. Got that? One of the nice things about this is it becomes easy to redirect printer output if a particular printer is down for a while. For example, laser9 is plugged into /dev/ttya on adenine. In the YP map, we have: laser9:lp=:rp=laser9:rm=adenine: while in adeine's /etc/printcap we have: laser9:lp=/dev/ttya: If for some reason laser9 is going to be down for a day or so, all I need do is change adenine's /etc/printcap to read: laser9:lp=:rp=laser10:rm=phrivax: and not bother changing the YP map. More important, I don't have to remember to change the YP map again when laser9 comes back up. Of course, that means every print job for laser9 will get sent to adenine and then turned around and get sent to phrivax to be queued on laser10, but we feel that the administrative convenience outweighs the extra network traffic (what difference does another few Mbytes a day make to an ethernet?) In fact, it doesn't even matter if we get the right machine in the "rm=" slot; if I happen to pick the wrong machine by mistake, it just means another hop across the network. Of course, if you expect the outage to last for any appreciable amount of time you will want to make the change directly in the YP map to avoid the extra hops. I didn't do the code changes; it was all done by Nomi Voroba, who no longer works here (Hi Nomi!). To tell you the truth, I havn't looked at the code much, so I don't know what kind of state it is in. I suspect that much of it is based on Sun-proprietary source, so we probably can't send it out. If I remember, I'll see about getting it all packaged up for export and then see if I can get Sun licensing to give me the go-ahead to post it. Lacking that, I could probaby just post the diffs. Roy Smith, System Administrator Public Health Research Institute {allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net