SUMMARY: Re: building NIS maps need help

From: Lisa Weihl (lweihl@cs.bgsu.edu)
Date: Tue Feb 23 1999 - 18:51:50 CST


See original problem at bottom. In short I was having trouble with building
a couple of NIS maps. Printers.conf is used by the Sun Soft Print Client
installed on my Solaris 2.5.1 systems. The services map did not want to
build either but it turned out that that was bombing while trying to push
one of the maps that did not exist. I commented out that line in the
Makefile and it was fine.

Using the suggestions below I double checked all the tabs in the
printers.conf code for building. It appeared ok but still would not work.
So I resorted to copying and pasting from the Makefile on the SunOS server
into the new Makefile. That worked.

Thanks for all your help.
Lisa

******************************************

However, Solaris 7 and 2.6 both supply a good start for the
printers.conf map in /usr/lib/print/Makefile.yp. Maybe you'll
have better results if you start with that. I did, modified it
extensively to get the printers.conf info from our two redundant
print servers (not the NIS master), change the backup queues for
the purposes of the NIS map to have a prepended "S" (for
secondary), and it all works great. The cutest part is that our
NIS master is a 2.5.1 server. Happily most of our clients are 2.6
or 7, but I had to make a script for our 2.5 and 2.5.1 systems to
update print queues, based upon printers.conf.byname contents, to
point to the print servers.

On the other hand, maybe your problem is simply lack of a leading
tab on one of your rule's lines.

--

Brooke King jbking@sandia.gov +1.505.844.5936 both voice and fax

********************************************

Hy...

I have this problem Three days ago...I have resolved it by verifying that thaer was no space but TAB in the /var/yp/Makefile

do a vi /var/yp/Makefile do a :set list

and verify that you only have "^I" and no " " (blank space)

/var/yp/Makefile is very strict with tab

If doesn t help, i can send you a sample of my Makefile

Regards

Francois-Rene HAMELIN (fhameli@cc00att.fr.lucent.com)

ORIGINAL QUESTION:

On Thu, 11 Feb 1999, Lisa Weihl wrote:

> I'm trying to build NIS maps on a new server running Solaris 2.6. Our old > NIS server is running SunOS. Bear with me I'm not good at regular > expressions or sed and awk (just no time to learn them) > > First I'm trying to build a map for printers.conf which is need by Sun Soft > Print Clients. > > I have a printers.conf file that has entries like such: > > cs|CS Faculty:\ > :lf=/var/adm/lpd-errs:\ > :lp=:\ > :sd=/usr/spool/lp/cs:\ > :hl=true:\ > :bsdaddr=maestro,cs: > > The portion of the yp Makefile that handles this fine under SunOS is: > > # add information for printers.conf used by Sun Soft > # Print clients (may need to keep this for LPRng) > > printers.conf.time: $(DIR)/printers.conf > -@if [ -f $(DIR)/printers.conf ]; then \ > (sed -e '/^#/d' -e s/#.*$$// -e 's/[ ][ ]*$$//' \ > -e '/\\$$/s/\\$$/ /' $(DIR)/printers.conf $(CHKPIPE))\ > |( awk '/ $$/ {printf "%s", $$0} !/ $$/ {print}' $(CHKPIPE))\ > |( sed -e 's/[ ][ ]*/ /g' -e 's/:[ ]*:/:/' \ > $(CHKPIPE))\ > |awk -F: '{n=split($$1, nm, "|"); for (i=1; i<=n; i++) \ > print nm[i], $$0}' \ > |$(MAKEDBM) - $(YPDBDIR)/$(DOM)/printers.conf.byname ; \ > touch printers.conf.time; \ > echo "updated printers.conf.time; \ > if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) \ > printers.conf.byname; \ > fi; \ > if [ ! $(NOPUSH) ]; then echo "pushed printers.conf"; fi ; \ > else \ > echo "couldn't find $(DIR)/printers.conf"; \ > fi > > > Using this same code on the Solaris server gives the following errors when > running make. > > /bin/sh: syntax error at line 1: `end of file' unexpected > make: [printers.conf.time] Error 2 (ignored) > > > Any ideas? > > > > A second problem is that the make is hanging while trying to build the > services map. The services file I'm using is pretty much the same as is in > /etc except with a few extra services like pop added at the end. Anyone > else have problems with building a services map? I'm using the standard > code in the Makefile for building services, that is I didn't tinker with it > at all. > > > Ideas on this? > > > Thanks, > Lisa >

****************************************************************** Lisa Weihl, System Administrator E-mail: lweihl@cs.bgsu.edu Department of Computer Science Office: Hayes 225 Bowling Green State University Phone: (419) 372-0116 Bowling Green, Ohio 43403-0214 Fax: (419) 372-8061



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:15 CDT